EdmFunctions.AddHours(DbExpression, DbExpression) 方法

定义

创建一个 DbFunctionExpression,它使用指定的参数(这些参数必须具有 DateTime、DateTimeOffset 或 Time 以及整数结果类型)调用规范 'AddHours' 函数。 表达式的结果类型与 timeValue 的结果类型相同。

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

参数

timeValue
DbExpression

一个表达式,指定要向其添加 addValueshould 的值。

addValue
DbExpression

一个表达式,指定要添加到 timeValue 的小时数。

返回

一个新的 DbFunctionExpression,它将 addValue 指定的小时数添加到 timeValue 指定的值。

适用于