1500 characters remaining
EntityFunctions Class

# EntityFunctions Class

.NET Framework 4.6 and 4.5

Provides common language runtime (CLR) methods that expose conceptual model canonical functions in LINQ to Entities queries. For information about canonical functions, see Canonical Functions.

## Inheritance Hierarchy

System.Object
System.Data.Objects.EntityFunctions

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

## Syntax

```public static class EntityFunctions
```

The EntityFunctions type exposes the following members.

## Methods

NameDescription
AsNonUnicodeA LINQ to Entities operator that treats the input string as a non-unicode string. This method only applies to LINQ to Entities queries.
AsUnicodeA LINQ to Entities operator that ensures the input string is treated as a unicode string. This method only applies to LINQ to Entities queries.
CreateDateTimeInvokes the canonical CreateDateTime function. For information about the canonical CreateDateTime function, see Date and Time Canonical Functions.
CreateDateTimeOffsetInvokes the canonical CreateDateTimeOffset function. For information about the canonical CreateDateTimeOffset function, see Date and Time Canonical Functions.
CreateTimeInvokes the canonical CreateTime function. For information about the canonical CreateTime function, see Date and Time Canonical Functions.
DiffDays(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffDays function. For information about the canonical DiffDays function, see Date and Time Canonical Functions.
DiffDays(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffDays function. For information about the canonical DiffDays function, see Date and Time Canonical Functions.
DiffHours(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffHours function. For information about the canonical DiffHours function, see Date and Time Canonical Functions.
DiffHours(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffHours function. For information about the canonical DiffHours function, see Date and Time Canonical Functions.
DiffHours(Nullable<TimeSpan>, Nullable<TimeSpan>)Invokes the canonical DiffHours function. For information about the canonical DiffHours function, see Date and Time Canonical Functions.
DiffMicroseconds(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffMicroseconds function. For information about the canonical DiffMicroseconds function, see Date and Time Canonical Functions.
DiffMicroseconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffMicroseconds function. For information about the canonical DiffMicroseconds function, see Date and Time Canonical Functions.
DiffMicroseconds(Nullable<TimeSpan>, Nullable<TimeSpan>)Invokes the canonical DiffMicroseconds function. For information about the canonical DiffMicroseconds function, see Date and Time Canonical Functions.
DiffMilliseconds(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffMilliseconds function. For information about the canonical DiffMilliseconds function, see Date and Time Canonical Functions.
DiffMilliseconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffMilliseconds function. For information about the canonical DiffMilliseconds function, see Date and Time Canonical Functions.
DiffMilliseconds(Nullable<TimeSpan>, Nullable<TimeSpan>)Invokes the canonical DiffMilliseconds function. For information about the canonical DiffMilliseconds function, see Date and Time Canonical Functions.
DiffMinutes(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffMinutes function. For information about the canonical DiffMinutes function, see Date and Time Canonical Functions.
DiffMinutes(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffMinutes function. For information about the canonical DiffMinutes function, see Date and Time Canonical Functions.
DiffMinutes(Nullable<TimeSpan>, Nullable<TimeSpan>)Invokes the canonical DiffMinutes function. For information about the canonical DiffMinutes function, see Date and Time Canonical Functions.
DiffMonths(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffMonths function. For information about the canonical DiffMonths function, see Date and Time Canonical Functions.
DiffMonths(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffMonths function. For information about the canonical DiffMonths function, see Date and Time Canonical Functions.
DiffNanoseconds(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffNanoseconds function. For information about the canonical DiffNanoseconds function, see Date and Time Canonical Functions.
DiffNanoseconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffNanoseconds function. For information about the canonical DiffNanoseconds function, see Date and Time Canonical Functions.
DiffNanoseconds(Nullable<TimeSpan>, Nullable<TimeSpan>)Invokes the canonical DiffNanoseconds function. For information about the canonical DiffNanoseconds function, see Date and Time Canonical Functions.
DiffSeconds(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffSeconds function. For information about the canonical DiffSeconds function, see Date and Time Canonical Functions.
DiffSeconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffSeconds function. For information about the canonical DiffSeconds function, see Date and Time Canonical Functions.
DiffSeconds(Nullable<TimeSpan>, Nullable<TimeSpan>)Invokes the canonical DiffSeconds function. For information about the canonical DiffSeconds function, see Date and Time Canonical Functions.
DiffYears(Nullable<DateTime>, Nullable<DateTime>)Invokes the canonical DiffYears function. For information about the canonical DiffYears function, see Date and Time Canonical Functions.
DiffYears(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Invokes the canonical DiffYears function. For information about the canonical DiffYears function, see Date and Time Canonical Functions.
GetTotalOffsetMinutesInvokes the canonical GetTotalOffsetMinutes function. For information about the canonical GetTotalOffsetMinutes function, see Date and Time Canonical Functions.
LeftInvokes the canonical Left function. For information about the canonical Left function, see String Canonical Functions.
ReverseInvokes the canonical Reverse function. For information about the canonical Reverse function, see String Canonical Functions.
RightInvokes the canonical Right function. For information about the canonical Right function, see String Canonical Functions.
StandardDeviation(IEnumerable<Decimal>)Invokes the canonical StDev function. For information about the canonical StDev function, see Canonical Functions.
StandardDeviation(IEnumerable<Nullable<Decimal>>)Invokes the canonical StDev function. For information about the canonical StDev function, see Canonical Functions.
StandardDeviation(IEnumerable<Double>)Invokes the canonical StDev function. For information about the canonical StDev function, see Canonical Functions.
StandardDeviation(IEnumerable<Nullable<Double>>)Invokes the canonical StDev function. For information about the canonical StDev function, see Canonical Functions.
StandardDeviation(IEnumerable<Int32>)Invokes the canonical StDev function. For information about the canonical StDev function, see Canonical Functions.
StandardDeviation(IEnumerable<Nullable<Int32>>)Invokes the canonical StDev function. For information about the canonical StDev function, see Canonical Functions.
StandardDeviation(IEnumerable<Int64>)Invokes the canonical StDev function. For information about the canonical StDev function, see Canonical Functions.
StandardDeviation(IEnumerable<Nullable<Int64>>)Invokes the canonical StDev function. For information about the canonical StDev function, see Canonical Functions.
StandardDeviationP(IEnumerable<Decimal>)Invokes the canonical StDevP function. For information about the canonical StDevP function, see Canonical Functions.
StandardDeviationP(IEnumerable<Nullable<Decimal>>)Invokes the canonical StDevP function. For information about the canonical StDevP function, see Canonical Functions.
StandardDeviationP(IEnumerable<Double>)Invokes the canonical StDevP function. For information about the canonical StDevP function, see Canonical Functions.
StandardDeviationP(IEnumerable<Nullable<Double>>)Invokes the canonical StDevP function. For information about the canonical StDevP function, see Canonical Functions.
StandardDeviationP(IEnumerable<Int32>)Invokes the canonical StDevP function. For information about the canonical StDevP function, see Canonical Functions.
StandardDeviationP(IEnumerable<Nullable<Int32>>)Invokes the canonical StDevP function. For information about the canonical StDevP function, see Canonical Functions.
StandardDeviationP(IEnumerable<Int64>)Invokes the canonical StDevP function. For information about the canonical StDevP function, see Canonical Functions.
StandardDeviationP(IEnumerable<Nullable<Int64>>)Invokes the canonical StDevP function. For information about the canonical StDevP function, see Canonical Functions.
Truncate(Nullable<Decimal>, Nullable<Int32>)Invokes the canonical Truncate function. For information about the canonical Truncate function, seeMath Canonical Functions.
Truncate(Nullable<Double>, Nullable<Int32>)Invokes the canonical Truncate function. For information about the canonical Truncate function, seeMath Canonical Functions.
TruncateTime(Nullable<DateTime>)Invokes the canonical TruncateTime function. For information about the canonical TruncateTime function, see Date and Time Canonical Functions.
TruncateTime(Nullable<DateTimeOffset>)Invokes the canonical TruncateTime function. For information about the canonical TruncateTime function, see Date and Time Canonical Functions.
Var(IEnumerable<Decimal>)Invokes the canonical Var function. For information about the canonical Var function, see Canonical Functions.
Var(IEnumerable<Nullable<Decimal>>)Invokes the canonical Var function. For information about the canonical Var function, see Canonical Functions.
Var(IEnumerable<Double>)Invokes the canonical Var function. For information about the canonical Var function, see Canonical Functions.
Var(IEnumerable<Nullable<Double>>)Invokes the canonical Var function. For information about the canonical Var function, see Canonical Functions.
Var(IEnumerable<Int32>)Invokes the canonical Var function. For information about the canonical Var function, see Canonical Functions.
Var(IEnumerable<Nullable<Int32>>)Invokes the canonical Var function. For information about the canonical Var function, see Canonical Functions.
Var(IEnumerable<Int64>)Invokes the canonical Var function. For information about the canonical Var function, see Canonical Functions.
Var(IEnumerable<Nullable<Int64>>)Invokes the canonical Var function. For information about the canonical Var function, see Canonical Functions.
VarP(IEnumerable<Decimal>)Invokes the canonical VarP function. For information about the canonical VarP function, see Canonical Functions.
VarP(IEnumerable<Nullable<Decimal>>)Invokes the canonical VarP function. For information about the canonical VarP function, see Canonical Functions.
VarP(IEnumerable<Double>)Invokes the canonical VarP function. For information about the canonical VarP function, see Canonical Functions.
VarP(IEnumerable<Nullable<Double>>)Invokes the canonical VarP function. For information about the canonical VarP function, see Canonical Functions.
VarP(IEnumerable<Int32>)Invokes the canonical VarP function. For information about the canonical VarP function, see Canonical Functions.
VarP(IEnumerable<Nullable<Int32>>)Invokes the canonical VarP function. For information about the canonical VarP function, see Canonical Functions.
VarP(IEnumerable<Int64>)Invokes the canonical VarP function. For information about the canonical VarP function, see Canonical Functions.
VarP(IEnumerable<Nullable<Int64>>)Invokes the canonical VarP function. For information about the canonical VarP function, see Canonical Functions.
Top

## Version Information

#### .NET Framework

Supported in: 4.6, 4.5, 4

Supported in: 4