SqlServerDbFunctionsExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides CLR methods that get translated to database functions when used in LINQ to Entities queries. The methods on this class are accessed via Functions.
public static class SqlServerDbFunctionsExtensions
type SqlServerDbFunctionsExtensions = class
Public Module SqlServerDbFunctionsExtensions
- Inheritance
-
SqlServerDbFunctionsExtensions
Remarks
See Database functions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.
Methods
AtTimeZone(DbFunctions, DateTime, String) |
Converts |
AtTimeZone(DbFunctions, DateTimeOffset, String) |
Converts |
Contains(DbFunctions, Object, String, Int32) |
A DbFunction method stub that can be used in LINQ queries to target the SQL Server |
Contains(DbFunctions, Object, String) |
A DbFunction method stub that can be used in LINQ queries to target the SQL Server |
Contains(DbFunctions, String, String, Int32) |
A DbFunction method stub that can be used in LINQ queries to target the SQL Server CONTAINS store function. |
Contains(DbFunctions, String, String) |
A DbFunction method stub that can be used in LINQ queries to target the SQL Server CONTAINS store function. |
DataLength(DbFunctions, Byte[]) |
Returns the number of bytes used to represent any expression. |
DataLength(DbFunctions, Nullable<Boolean>) |
Returns the number of bytes used to represent any expression. |
DataLength(DbFunctions, Nullable<DateTime>) |
Returns the number of bytes used to represent any expression. |
DataLength(DbFunctions, Nullable<DateTimeOffset>) |
Returns the number of bytes used to represent any expression. |
DataLength(DbFunctions, Nullable<Decimal>) |
Returns the number of bytes used to represent any expression. |
DataLength(DbFunctions, Nullable<Double>) |
Returns the number of bytes used to represent any expression. |
DataLength(DbFunctions, Nullable<Guid>) |
Returns the number of bytes used to represent any expression. |
DataLength(DbFunctions, Nullable<TimeSpan>) |
Returns the number of bytes used to represent any expression. |
DataLength(DbFunctions, String) |
Returns the number of bytes used to represent any expression. |
DateDiffDay(DbFunctions, DateOnly, DateOnly) |
Counts the number of day boundaries crossed between the |
DateDiffDay(DbFunctions, DateTime, DateTime) |
Counts the number of day boundaries crossed between the |
DateDiffDay(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of day boundaries crossed between the |
DateDiffDay(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of day boundaries crossed between the |
DateDiffDay(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of day boundaries crossed between the |
DateDiffDay(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of day boundaries crossed between the |
DateDiffHour(DbFunctions, DateOnly, DateOnly) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, DateTime, DateTime) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, Nullable<TimeOnly>, Nullable<TimeOnly>) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, Nullable<TimeSpan>, Nullable<TimeSpan>) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, TimeOnly, TimeOnly) |
Counts the number of hour boundaries crossed between the |
DateDiffHour(DbFunctions, TimeSpan, TimeSpan) |
Counts the number of hour boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, DateOnly, DateOnly) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, DateTime, DateTime) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, Nullable<TimeOnly>, Nullable<TimeOnly>) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, Nullable<TimeSpan>, Nullable<TimeSpan>) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, TimeOnly, TimeOnly) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMicrosecond(DbFunctions, TimeSpan, TimeSpan) |
Counts the number of microsecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, DateOnly, DateOnly) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, DateTime, DateTime) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, Nullable<TimeOnly>, Nullable<TimeOnly>) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, Nullable<TimeSpan>, Nullable<TimeSpan>) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, TimeOnly, TimeOnly) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMillisecond(DbFunctions, TimeSpan, TimeSpan) |
Counts the number of millisecond boundaries crossed between the |
DateDiffMinute(DbFunctions, DateOnly, DateOnly) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, DateTime, DateTime) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, Nullable<TimeOnly>, Nullable<TimeOnly>) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, Nullable<TimeSpan>, Nullable<TimeSpan>) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, TimeOnly, TimeOnly) |
Counts the number of minute boundaries crossed between the |
DateDiffMinute(DbFunctions, TimeSpan, TimeSpan) |
Counts the number of minute boundaries crossed between the |
DateDiffMonth(DbFunctions, DateOnly, DateOnly) |
Counts the number of month boundaries crossed between the |
DateDiffMonth(DbFunctions, DateTime, DateTime) |
Counts the number of month boundaries crossed between the |
DateDiffMonth(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of month boundaries crossed between the |
DateDiffMonth(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of month boundaries crossed between the |
DateDiffMonth(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of month boundaries crossed between the |
DateDiffMonth(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of month boundaries crossed between the |
DateDiffNanosecond(DbFunctions, DateOnly, DateOnly) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, DateTime, DateTime) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, Nullable<TimeOnly>, Nullable<TimeOnly>) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, Nullable<TimeSpan>, Nullable<TimeSpan>) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, TimeOnly, TimeOnly) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffNanosecond(DbFunctions, TimeSpan, TimeSpan) |
Counts the number of nanosecond boundaries crossed between the |
DateDiffSecond(DbFunctions, DateOnly, DateOnly) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, DateTime, DateTime) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, Nullable<TimeOnly>, Nullable<TimeOnly>) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, Nullable<TimeSpan>, Nullable<TimeSpan>) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, TimeOnly, TimeOnly) |
Counts the number of second boundaries crossed between the |
DateDiffSecond(DbFunctions, TimeSpan, TimeSpan) |
Counts the number of second boundaries crossed between the |
DateDiffWeek(DbFunctions, DateOnly, DateOnly) |
Counts the number of week boundaries crossed between the |
DateDiffWeek(DbFunctions, DateTime, DateTime) |
Counts the number of week boundaries crossed between the |
DateDiffWeek(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of week boundaries crossed between the |
DateDiffWeek(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of week boundaries crossed between the |
DateDiffWeek(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of week boundaries crossed between the |
DateDiffWeek(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of week boundaries crossed between the |
DateDiffYear(DbFunctions, DateOnly, DateOnly) |
Counts the number of year boundaries crossed between the |
DateDiffYear(DbFunctions, DateTime, DateTime) |
Counts the number of year boundaries crossed between the |
DateDiffYear(DbFunctions, DateTimeOffset, DateTimeOffset) |
Counts the number of year boundaries crossed between the |
DateDiffYear(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>) |
Counts the number of year boundaries crossed between the |
DateDiffYear(DbFunctions, Nullable<DateTime>, Nullable<DateTime>) |
Counts the number of year boundaries crossed between |
DateDiffYear(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) |
Counts the number of year boundaries crossed between the |
DateFromParts(DbFunctions, Int32, Int32, Int32) |
Initializes a new instance of the DateTime structure to the specified year, month, day.
Corresponds to SQL Server's |
DateTime2FromParts(DbFunctions, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) |
Initializes a new instance of the DateTime structure to the specified year, month, day, hour, minute, second,
fractions, and precision.
Corresponds to SQL Server's |
DateTimeFromParts(DbFunctions, Int32, Int32, Int32, Int32, Int32, Int32, Int32) |
Initializes a new instance of the DateTime structure to the specified year, month, day, hour, minute, second,
and millisecond.
Corresponds to SQL Server's |
DateTimeOffsetFromParts(DbFunctions, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) |
Initializes a new instance of the DateTimeOffset structure to the specified year, month, day, hour, minute,
second, fractions, hourOffset, minuteOffset and precision.
Corresponds to SQL Server's
|
FreeText(DbFunctions, Object, String, Int32) |
A DbFunction method stub that can be used in LINQ queries to target the SQL Server |
FreeText(DbFunctions, Object, String) |
A DbFunction method stub that can be used in LINQ queries to target the SQL Server |
FreeText(DbFunctions, String, String, Int32) |
A DbFunction method stub that can be used in LINQ queries to target the SQL Server FREETEXT store function. |
FreeText(DbFunctions, String, String) |
A DbFunction method stub that can be used in LINQ queries to target the SQL Server FREETEXT store function. |
IsDate(DbFunctions, String) |
Validate if the given string is a valid date.
Corresponds to SQL Server's |
IsNumeric(DbFunctions, String) |
Validate if the given string is a valid numeric.
Corresponds to the SQL Server |
PatIndex(DbFunctions, String, String) |
Returns the starting position of the first occurrence of a pattern in a specified expression, or zero if the pattern is not found, on all valid text and character data types. |
SmallDateTimeFromParts(DbFunctions, Int32, Int32, Int32, Int32, Int32) |
Initializes a new instance of the DateTime structure to the specified year, month, day, hour and minute.
Corresponds to SQL Server's |
StandardDeviationPopulation(DbFunctions, IEnumerable<Byte>) |
Returns the population standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationPopulation(DbFunctions, IEnumerable<Decimal>) |
Returns the population standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationPopulation(DbFunctions, IEnumerable<Double>) |
Returns the population standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationPopulation(DbFunctions, IEnumerable<Int16>) |
Returns the population standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationPopulation(DbFunctions, IEnumerable<Int32>) |
Returns the population standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationPopulation(DbFunctions, IEnumerable<Int64>) |
Returns the population standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationPopulation(DbFunctions, IEnumerable<Single>) |
Returns the population standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationSample(DbFunctions, IEnumerable<Byte>) |
Returns the sample standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationSample(DbFunctions, IEnumerable<Decimal>) |
Returns the sample standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationSample(DbFunctions, IEnumerable<Double>) |
Returns the sample standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationSample(DbFunctions, IEnumerable<Int16>) |
Returns the sample standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationSample(DbFunctions, IEnumerable<Int32>) |
Returns the sample standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationSample(DbFunctions, IEnumerable<Int64>) |
Returns the sample standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
StandardDeviationSample(DbFunctions, IEnumerable<Single>) |
Returns the sample standard deviation of all values in the specified expression.
Corresponds to SQL Server's |
TimeFromParts(DbFunctions, Int32, Int32, Int32, Int32, Int32) |
Initializes a new instance of the TimeSpan structure to the specified hour, minute, second, fractions, and
precision. Corresponds to SQL Server's |
VariancePopulation(DbFunctions, IEnumerable<Byte>) |
Returns the population variance of all values in the specified expression.
Corresponds to SQL Server's |
VariancePopulation(DbFunctions, IEnumerable<Decimal>) |
Returns the population variance of all values in the specified expression.
Corresponds to SQL Server's |
VariancePopulation(DbFunctions, IEnumerable<Double>) |
Returns the population variance of all values in the specified expression.
Corresponds to SQL Server's |
VariancePopulation(DbFunctions, IEnumerable<Int16>) |
Returns the population variance of all values in the specified expression.
Corresponds to SQL Server's |
VariancePopulation(DbFunctions, IEnumerable<Int32>) |
Returns the population variance of all values in the specified expression.
Corresponds to SQL Server's |
VariancePopulation(DbFunctions, IEnumerable<Int64>) |
Returns the population variance of all values in the specified expression.
Corresponds to SQL Server's |
VariancePopulation(DbFunctions, IEnumerable<Single>) |
Returns the population variance of all values in the specified expression.
Corresponds to SQL Server's |
VarianceSample(DbFunctions, IEnumerable<Byte>) |
Returns the sample variance of all values in the specified expression.
Corresponds to SQL Server's |
VarianceSample(DbFunctions, IEnumerable<Decimal>) |
Returns the sample variance of all values in the specified expression.
Corresponds to SQL Server's |
VarianceSample(DbFunctions, IEnumerable<Double>) |
Returns the sample variance of all values in the specified expression.
Corresponds to SQL Server's |
VarianceSample(DbFunctions, IEnumerable<Int16>) |
Returns the sample variance of all values in the specified expression.
Corresponds to SQL Server's |
VarianceSample(DbFunctions, IEnumerable<Int32>) |
Returns the sample variance of all values in the specified expression.
Corresponds to SQL Server's |
VarianceSample(DbFunctions, IEnumerable<Int64>) |
Returns the sample variance of all values in the specified expression.
Corresponds to SQL Server's |
VarianceSample(DbFunctions, IEnumerable<Single>) |
Returns the sample variance of all values in the specified expression.
Corresponds to SQL Server's |