EntityFunctions.AddDays 方法

定义

重载

AddDays(Nullable<DateTime>, Nullable<Int32>)

当用作 LINQ to Entities 查询的一部分时,此方法调用规范的 AddDays EDM 函数,将给定的天数添加到日期/时间。

AddDays(Nullable<DateTimeOffset>, Nullable<Int32>)

当用作 LINQ to Entities 查询的一部分时,此方法调用规范的 AddDays EDM 函数,将给定的天数添加到日期/时间。

AddDays(Nullable<DateTime>, Nullable<Int32>)

当用作 LINQ to Entities 查询的一部分时,此方法调用规范的 AddDays EDM 函数,将给定的天数添加到日期/时间。

[System.Data.Entity.DbFunction("Edm", "AddDays")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="dateValue")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="addValue")]
public static Nullable<DateTime> AddDays(Nullable<DateTime> dateValue, Nullable<int> addValue);
static member AddDays : Nullable<DateTime> * Nullable<int> -> Nullable<DateTime>
Public Shared Function AddDays (dateValue As Nullable(Of DateTime), addValue As Nullable(Of Integer)) As Nullable(Of DateTime)

参数

dateValue
Nullable<DateTime>

输入日期/时间。

addValue
Nullable<Int32>

要添加的天数。

返回

生成的日期/时间。

属性

注解

不能直接调用此函数。 此函数只能出现在 LINQ to Entities 查询中。 此函数将转换为数据库中的相应函数。

适用于

AddDays(Nullable<DateTimeOffset>, Nullable<Int32>)

当用作 LINQ to Entities 查询的一部分时,此方法调用规范的 AddDays EDM 函数,将给定的天数添加到日期/时间。

[System.Data.Entity.DbFunction("Edm", "AddDays")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="addValue")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="dateValue")]
public static Nullable<DateTimeOffset> AddDays(Nullable<DateTimeOffset> dateValue, Nullable<int> addValue);
static member AddDays : Nullable<DateTimeOffset> * Nullable<int> -> Nullable<DateTimeOffset>
Public Shared Function AddDays (dateValue As Nullable(Of DateTimeOffset), addValue As Nullable(Of Integer)) As Nullable(Of DateTimeOffset)

参数

dateValue
Nullable<DateTimeOffset>

输入日期/时间。

addValue
Nullable<Int32>

要添加的天数。

返回

生成的日期/时间。

属性

注解

不能直接调用此函数。 此函数只能出现在 LINQ to Entities 查询中。 此函数将转换为数据库中的相应函数。

适用于