语言

EdmFunctions.DiffNanoseconds(DbExpression, DbExpression) 方法

定义

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

public static System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression DiffNanoseconds(this System.Data.Entity.Core.Common.CommandTrees.DbExpression timeValue1, System.Data.Entity.Core.Common.CommandTrees.DbExpression timeValue2);
static member DiffNanoseconds : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Common.CommandTrees.DbExpression -> System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function DiffNanoseconds (timeValue1 As DbExpression, timeValue2 As DbExpression) As DbFunctionExpression

参数

timeValue1
DbExpression

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

timeValue2
DbExpression

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

返回

一个新的 DbFunctionExpression,它返回的纳秒数是 timeValue1 和 timeValue2 之间的差异。

适用于