EdmFunctions.DiffMilliseconds(DbExpression, DbExpression) 方法

定义

创建一个 DbFunctionExpression ,它使用指定的参数调用规范的“DiffMilliseconds”函数,每个参数必须具有 DateTime、DateTimeOffset 或 Time 结果类型。 表达式的结果类型为 Edm.Int32。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ DiffMilliseconds(System::Data::Common::CommandTrees::DbExpression ^ timeValue1, System::Data::Common::CommandTrees::DbExpression ^ timeValue2);
public static System.Data.Common.CommandTrees.DbFunctionExpression DiffMilliseconds(this System.Data.Common.CommandTrees.DbExpression timeValue1, System.Data.Common.CommandTrees.DbExpression timeValue2);
static member DiffMilliseconds : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function DiffMilliseconds (timeValue1 As DbExpression, timeValue2 As DbExpression) As DbFunctionExpression

参数

timeValue1
DbExpression

一个表达式,指定第一次值参数。

timeValue2
DbExpression

一个表达式,指定第二次值参数。

返回

一个新的 DbFunctionExpression,它返回的毫秒数是两者之间timeValue1的差值。timeValue2

适用于