Click or drag to resize

MySQLDbFunctionsExtensions Class

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.
Inheritance Hierarchy
SystemObject
  MySql.Data.EntityFrameworkCore.ExtensionsMySQLDbFunctionsExtensions

Namespace:  MySql.Data.EntityFrameworkCore.Extensions
Assembly:  MySql.Data.EntityFrameworkCore (in MySql.Data.EntityFrameworkCore.dll) Version: 8.0.22
Syntax
public static class MySQLDbFunctionsExtensions
Methods
  NameDescription
Public methodStatic memberDateDiffDay(DbFunctions, DateTime, DateTime)
Counts the number of day boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(DAY,startDate,endDate).
Public methodStatic memberDateDiffDay(DbFunctions, DateTimeOffset, DateTimeOffset)
Counts the number of day boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(DAY,startDate,endDate).
Public methodStatic memberDateDiffDay(DbFunctions, NullableDateTime, NullableDateTime)
Counts the number of day boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(DAY,startDate,endDate).
Public methodStatic memberDateDiffDay(DbFunctions, NullableDateTimeOffset, NullableDateTimeOffset)
Counts the number of day boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(DAY,startDate,endDate).
Public methodStatic memberDateDiffHour(DbFunctions, DateTime, DateTime)
Counts the number of hour boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(HOUR,startDate,endDate).
Public methodStatic memberDateDiffHour(DbFunctions, DateTimeOffset, DateTimeOffset)
Counts the number of hour boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(HOUR,startDate,endDate).
Public methodStatic memberDateDiffHour(DbFunctions, NullableDateTime, NullableDateTime)
Counts the number of hour boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(HOUR,startDate,endDate).
Public methodStatic memberDateDiffHour(DbFunctions, NullableDateTimeOffset, NullableDateTimeOffset)
Counts the number of hour boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(HOUR,startDate,endDate).
Public methodStatic memberDateDiffMicrosecond(DbFunctions, DateTime, DateTime)
Counts the number of microsecond boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MICROSECOND,startDate,endDate).
Public methodStatic memberDateDiffMicrosecond(DbFunctions, DateTimeOffset, DateTimeOffset)
Counts the number of microsecond boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MICROSECOND,startDate,endDate).
Public methodStatic memberDateDiffMicrosecond(DbFunctions, NullableDateTime, NullableDateTime)
Counts the number of microsecond boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MICROSECOND,startDate,endDate).
Public methodStatic memberDateDiffMicrosecond(DbFunctions, NullableDateTimeOffset, NullableDateTimeOffset)
Counts the number of microsecond boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MICROSECOND,startDate,endDate).
Public methodStatic memberDateDiffMinute(DbFunctions, DateTime, DateTime)
Counts the number of minute boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MINUTE,startDate,endDate).
Public methodStatic memberDateDiffMinute(DbFunctions, DateTimeOffset, DateTimeOffset)
Counts the number of minute boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MINUTE,startDate,endDate).
Public methodStatic memberDateDiffMinute(DbFunctions, NullableDateTime, NullableDateTime)
Counts the number of minute boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MINUTE,startDate,endDate).
Public methodStatic memberDateDiffMinute(DbFunctions, NullableDateTimeOffset, NullableDateTimeOffset)
Counts the number of minute boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MINUTE,startDate,endDate).
Public methodStatic memberDateDiffMonth(DbFunctions, DateTime, DateTime)
Counts the number of month boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MONTH,startDate,endDate).
Public methodStatic memberDateDiffMonth(DbFunctions, DateTimeOffset, DateTimeOffset)
Counts the number of month boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MONTH,startDate,endDate).
Public methodStatic memberDateDiffMonth(DbFunctions, NullableDateTime, NullableDateTime)
Counts the number of month boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MONTH,startDate,endDate).
Public methodStatic memberDateDiffMonth(DbFunctions, NullableDateTimeOffset, NullableDateTimeOffset)
Counts the number of month boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(MONTH,startDate,endDate).
Public methodStatic memberDateDiffSecond(DbFunctions, DateTime, DateTime)
Counts the number of second boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(SECOND,startDate,endDate).
Public methodStatic memberDateDiffSecond(DbFunctions, DateTimeOffset, DateTimeOffset)
Counts the number of second boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(SECOND,startDate,endDate).
Public methodStatic memberDateDiffSecond(DbFunctions, NullableDateTime, NullableDateTime)
Counts the number of second boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(SECOND,startDate,endDate).
Public methodStatic memberDateDiffSecond(DbFunctions, NullableDateTimeOffset, NullableDateTimeOffset)
Counts the number of second boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(SECOND,startDate,endDate).
Public methodStatic memberDateDiffYear(DbFunctions, DateTime, DateTime)
Counts the number of year boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(YEAR,startDate,endDate).
Public methodStatic memberDateDiffYear(DbFunctions, DateTimeOffset, DateTimeOffset)
Counts the number of year boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(YEAR,startDate,endDate).
Public methodStatic memberDateDiffYear(DbFunctions, NullableDateTime, NullableDateTime)
Counts the number of year boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(YEAR,startDate,endDate).
Public methodStatic memberDateDiffYear(DbFunctions, NullableDateTimeOffset, NullableDateTimeOffset)
Counts the number of year boundaries crossed between the startDate and endDate. Corresponds to TIMESTAMPDIFF(YEAR,startDate,endDate).
Public methodStatic memberLikeT(DbFunctions, T, String)

An implementation of the SQL LIKE operation. On relational databases this is usually directly translated to SQL.

Note that if this function is translated into SQL, then the semantics of the comparison will depend on the database configuration. In particular, it may be either case-sensitive or case-insensitive. If this function is evaluated on the client, then it will always use a case-insensitive comparison.

Public methodStatic memberLikeT(DbFunctions, T, String, String)

An implementation of the SQL LIKE operation. On relational databases this is usually directly translated to SQL.

Note that if this function is translated into SQL, then the semantics of the comparison will depend on the database configuration. In particular, it may be either case-sensitive or case-insensitive. If this function is evaluated on the client, then it will always use a case-insensitive comparison.

Top
See Also