Share via


EntityFunctions Class

Definition

Caution

This class has been replaced by System.Data.Entity.DbFunctions.

Provides common language runtime (CLR) methods that expose EDM canonical functions for use in DbContext or ObjectContext LINQ to Entities queries.

[System.Obsolete("This class has been replaced by System.Data.Entity.DbFunctions.")]
public static class EntityFunctions
type EntityFunctions = class
Public Class EntityFunctions
Inheritance
EntityFunctions
Attributes

Remarks

Note that these functions have been moved to the DbFunctions class starting with EF6. The functions are retained here only to help in the migration of older EF apps to EF6.

Methods

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to add the given number of days to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to add the given number of days to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to add the given number of hours to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to add the given number of hours to a date/time.

AddHours(Nullable<TimeSpan>, Nullable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to add the given number of hours to a time span.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to add the given number of microseconds to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to add the given number of microseconds to a date/time.

AddMicroseconds(Nullable<TimeSpan>, Nullable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to add the given number of microseconds to a time span.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to add the given number of milliseconds to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to add the given number of milliseconds to a date/time.

AddMilliseconds(Nullable<TimeSpan>, Nullable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to add the given number of milliseconds to a time span.

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

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 date/time.

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

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 date/time.

AddMinutes(Nullable<TimeSpan>, Nullable<Int32>)

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.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to add the given number of months to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to add the given number of months to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to add the given number of nanoseconds to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to add the given number of nanoseconds to a date/time.

AddNanoseconds(Nullable<TimeSpan>, Nullable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to add the given number of nanoseconds to a time span.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to add the given number of seconds to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to add the given number of seconds to a date/time.

AddSeconds(Nullable<TimeSpan>, Nullable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to add the given number of seconds to a time span.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to add the given number of years to a date/time.

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

When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to add the given number of years to a date/time.

AsNonUnicode(String)

When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input is treated as a non-Unicode string.

AsUnicode(String)

When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input is treated as a Unicode string.

CreateDateTime(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Double>)

When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTime EDM function to create a new DateTime object.

CreateDateTimeOffset(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTimeOffset EDM function to create a new DateTimeOffset object.

CreateTime(Nullable<Int32>, Nullable<Int32>, Nullable<Double>)

When used as part of a LINQ to Entities query, this method invokes the canonical CreateTime EDM function to create a new TimeSpan object.

DiffDays(Nullable<DateTime>, Nullable<DateTime>)

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

DiffDays(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

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

DiffHours(Nullable<DateTime>, Nullable<DateTime>)

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

DiffHours(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

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

DiffHours(Nullable<TimeSpan>, Nullable<TimeSpan>)

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

DiffMicroseconds(Nullable<DateTime>, Nullable<DateTime>)

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

DiffMicroseconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

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

DiffMicroseconds(Nullable<TimeSpan>, Nullable<TimeSpan>)

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

DiffMilliseconds(Nullable<DateTime>, Nullable<DateTime>)

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

DiffMilliseconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

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

DiffMilliseconds(Nullable<TimeSpan>, Nullable<TimeSpan>)

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

DiffMinutes(Nullable<DateTime>, Nullable<DateTime>)

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

DiffMinutes(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

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

DiffMinutes(Nullable<TimeSpan>, Nullable<TimeSpan>)

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

DiffMonths(Nullable<DateTime>, Nullable<DateTime>)

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

DiffMonths(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

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

DiffNanoseconds(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.

DiffNanoseconds(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.

DiffNanoseconds(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.

DiffSeconds(Nullable<DateTime>, Nullable<DateTime>)

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

DiffSeconds(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

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

DiffSeconds(Nullable<TimeSpan>, Nullable<TimeSpan>)

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

DiffYears(Nullable<DateTime>, Nullable<DateTime>)

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

DiffYears(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

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

GetTotalOffsetMinutes(Nullable<DateTimeOffset>)

When used as part of a LINQ to Entities query, this method invokes the canonical GetTotalOffsetMinutes EDM function to return the number of minutes that the given date/time is offset from UTC. This is generally between +780 and -780 (+ or - 13 hrs).

Left(String, Nullable<Int64>)

When used as part of a LINQ to Entities query, this method invokes the canonical Left EDM function to return a given number of the leftmost characters in a string.

Like(String, String, String)

When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression.

Like(String, String)

When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression.

Reverse(String)

When used as part of a LINQ to Entities query, this method invokes the canonical Reverse EDM function to return a given string with the order of the characters reversed.

Right(String, Nullable<Int64>)

When used as part of a LINQ to Entities query, this method invokes the canonical Right EDM function to return a given number of the rightmost characters in a string.

StandardDeviation(IEnumerable<Decimal>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate the standard deviation of the collection.

StandardDeviation(IEnumerable<Double>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate the standard deviation of the collection.

StandardDeviation(IEnumerable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate the standard deviation of the collection.

StandardDeviation(IEnumerable<Int64>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate the standard deviation of the collection.

StandardDeviation(IEnumerable<Nullable<Decimal>>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate the standard deviation of the collection.

StandardDeviation(IEnumerable<Nullable<Double>>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate the standard deviation of the collection.

StandardDeviation(IEnumerable<Nullable<Int32>>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate the standard deviation of the collection.

StandardDeviation(IEnumerable<Nullable<Int64>>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate the standard deviation of the collection.

StandardDeviationP(IEnumerable<Decimal>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate the standard deviation for the population.

StandardDeviationP(IEnumerable<Double>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate the standard deviation for the population.

StandardDeviationP(IEnumerable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate the standard deviation for the population.

StandardDeviationP(IEnumerable<Int64>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate the standard deviation for the population.

StandardDeviationP(IEnumerable<Nullable<Decimal>>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate the standard deviation for the population.

StandardDeviationP(IEnumerable<Nullable<Double>>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate the standard deviation for the population.

StandardDeviationP(IEnumerable<Nullable<Int32>>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate the standard deviation for the population.

StandardDeviationP(IEnumerable<Nullable<Int64>>)

When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate the standard deviation for the population.

Truncate(Nullable<Decimal>, Nullable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to truncate the given value to the number of specified digits.

Truncate(Nullable<Double>, Nullable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to truncate the given value to the number of specified digits.

TruncateTime(Nullable<DateTime>)

When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return the given date with the time portion cleared.

TruncateTime(Nullable<DateTimeOffset>)

When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return the given date with the time portion cleared.

Var(IEnumerable<Decimal>)

When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate the variance of the collection.

Var(IEnumerable<Double>)

When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate the variance of the collection.

Var(IEnumerable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate the variance of the collection.

Var(IEnumerable<Int64>)

When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate the variance of the collection.

Var(IEnumerable<Nullable<Decimal>>)

When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate the variance of the collection.

Var(IEnumerable<Nullable<Double>>)

When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate the variance of the collection.

Var(IEnumerable<Nullable<Int32>>)

When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate the variance of the collection.

Var(IEnumerable<Nullable<Int64>>)

When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate the variance of the collection.

VarP(IEnumerable<Decimal>)

When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate the variance for the population.

VarP(IEnumerable<Double>)

When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate the variance for the population.

VarP(IEnumerable<Int32>)

When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate the variance for the population.

VarP(IEnumerable<Int64>)

When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate the variance for the population.

VarP(IEnumerable<Nullable<Decimal>>)

When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate the variance for the population.

VarP(IEnumerable<Nullable<Double>>)

When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate the variance for the population.

VarP(IEnumerable<Nullable<Int32>>)

When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate the variance for the population.

VarP(IEnumerable<Nullable<Int64>>)

When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate the variance for the population.

Applies to