DbFunctions Class

Entity Framework 6.0
 

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

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

System.Object
  System.Data.Entity.DbFunctions

public static class DbFunctions

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAddDays(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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

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

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

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

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

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

System_CAPS_pubmethodSystem_CAPS_staticGetTotalOffsetMinutes(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).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Note that this class was called EntityFunctions in some previous versions of Entity Framework.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: