EdmFunctions.AddMonths(DbExpression, DbExpression) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建一个 DbFunctionExpression ,它使用指定的参数调用规范“AddMonths”函数,该函数必须具有 DateTime 或 DateTimeOffset 和整数结果类型。 表达式的结果类型与 dateValue 的结果类型相同。
public static System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression AddMonths(this System.Data.Entity.Core.Common.CommandTrees.DbExpression dateValue, System.Data.Entity.Core.Common.CommandTrees.DbExpression addValue);
static member AddMonths : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Common.CommandTrees.DbExpression -> System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function AddMonths (dateValue As DbExpression, addValue As DbExpression) As DbFunctionExpression
参数
- dateValue
- DbExpression
一个表达式,指定要向其添加 addValueshould 的值。
- addValue
- DbExpression
一个表达式,指定要添加到 dateValue 中的月份数。
返回
一个新的 DbFunctionExpression,它将 addValue 指定的月份数添加到 dateValue 指定的值。