EntityFunctions.DiffNanoseconds Method

 

Invokes the canonical DiffNanoseconds EDM function to calculate the number of nanoseconds between two date/times when used as part of a LINQ to Entities query.

Namespace:   System.Data.Entity.Core.Objects
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticDiffNanoseconds(Nullable<DateTime>, Nullable<DateTime>)

When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to calculate the number of nanoseconds between two date/times.

System_CAPS_pubmethodSystem_CAPS_staticDiffNanoseconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to calculate the number of nanoseconds between two date/times.

System_CAPS_pubmethodSystem_CAPS_staticDiffNanoseconds(Nullable<TimeSpan>, Nullable<TimeSpan>)

When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to calculate the number of nanoseconds between two time spans.


EntityFunctions.DiffNanoseconds Method (Nullable<DateTime>, Nullable<DateTime>)

When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to calculate the number of nanoseconds between two date/times.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "timeValue1")]
[DbFunctionAttribute("Edm", "DiffNanoseconds")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "timeValue2")]
public static Nullable<int> DiffNanoseconds(
	Nullable<DateTime> timeValue1,
	Nullable<DateTime> timeValue2
)

Parameters

timeValue1
Type: System.Nullable<DateTime>

The first date/time.

timeValue2
Type: System.Nullable<DateTime>

The second date/time.

Return Value

Type: System.Nullable<Int32>

The number of nanoseconds between the first and second date/times.

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.


EntityFunctions.DiffNanoseconds Method (Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to calculate the number of nanoseconds between two date/times.

[DbFunctionAttribute("Edm", "DiffNanoseconds")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "timeValue2")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "timeValue1")]
public static Nullable<int> DiffNanoseconds(
	Nullable<DateTimeOffset> timeValue1,
	Nullable<DateTimeOffset> timeValue2
)

Parameters

timeValue1
Type: System.Nullable<DateTimeOffset>

The first date/time.

timeValue2
Type: System.Nullable<DateTimeOffset>

The second date/time.

Return Value

Type: System.Nullable<Int32>

The number of nanoseconds between the first and second date/times.

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.


EntityFunctions.DiffNanoseconds Method (Nullable<TimeSpan>, Nullable<TimeSpan>)

When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to calculate the number of nanoseconds between two time spans.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "timeValue2")]
[DbFunctionAttribute("Edm", "DiffNanoseconds")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "timeValue1")]
public static Nullable<int> DiffNanoseconds(
	Nullable<TimeSpan> timeValue1,
	Nullable<TimeSpan> timeValue2
)

Parameters

timeValue1
Type: System.Nullable<TimeSpan>

The first time span.

timeValue2
Type: System.Nullable<TimeSpan>

The second time span.

Return Value

Type: System.Nullable<Int32>

The number of nanoseconds between the first and second time spans.

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.