DbFunctions.AddMinutes Method (Nullable<TimeSpan>, Nullable<Int32>)
[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]
When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to add the given number of minutes to a time span.
Namespace: System.Data.Entity
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "addValue")> _
<DbFunctionAttribute("Edm", "AddMinutes")> _
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "timeValue")> _
Public Shared Function AddMinutes ( _
timeValue As Nullable(Of TimeSpan), _
addValue As Nullable(Of Integer) _
) As Nullable(Of TimeSpan)
'Usage
Dim timeValue As Nullable(Of TimeSpan)
Dim addValue As Nullable(Of Integer)
Dim returnValue As Nullable(Of TimeSpan)
returnValue = DbFunctions.AddMinutes(timeValue, _
addValue)
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "addValue")]
[DbFunctionAttribute("Edm", "AddMinutes")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "timeValue")]
public static Nullable<TimeSpan> AddMinutes(
Nullable<TimeSpan> timeValue,
Nullable<int> addValue
)
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"addValue")]
[DbFunctionAttribute(L"Edm", L"AddMinutes")]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"timeValue")]
public:
static Nullable<TimeSpan> AddMinutes(
Nullable<TimeSpan> timeValue,
Nullable<int> addValue
)
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "addValue")>]
[<DbFunctionAttribute("Edm", "AddMinutes")>]
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "timeValue")>]
static member AddMinutes :
timeValue:Nullable<TimeSpan> *
addValue:Nullable<int> -> Nullable<TimeSpan>
public static function AddMinutes(
timeValue : Nullable<TimeSpan>,
addValue : Nullable<int>
) : Nullable<TimeSpan>
Parameters
- timeValue
Type: System.Nullable<TimeSpan>
The input date/time.
- addValue
Type: System.Nullable<Int32>
The number of minutes to add.
Return Value
Type: System.Nullable<TimeSpan>
A resulting time span.
Remarks
You cannot call this function directly. This function can only appear within a LINQ to Entities query. This function is translated to a corresponding function in the database.