Class RelationalDbFunctionsExtensions
- Namespace
- Microsoft.EntityFrameworkCore
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Provides CLR methods that get translated to database functions when used in LINQ to Entities queries. The methods on this class are accessed via Microsoft.EntityFrameworkCore.EF.Functions.
public static class RelationalDbFunctionsExtensions
- Inheritance
-
RelationalDbFunctionsExtensions
- Inherited Members
Remarks
See Database functions for more information and examples.
Methods
Collate<TProperty>(DbFunctions, TProperty, string)
Explicitly specifies a collation to be used in a LINQ query. Can be used to generate fragments such as
WHERE customer.name COLLATE 'de_DE' = 'John Doe'
.
public static TProperty Collate<TProperty>(this DbFunctions _, TProperty operand, string collation)
Parameters
_
DbFunctionsThe Microsoft.EntityFrameworkCore.DbFunctions instance.
operand
TPropertyThe operand to which to apply the collation.
collation
stringThe name of the collation.
Returns
- TProperty
Type Parameters
TProperty
The type of the operand on which the collation is being specified.
Remarks
The available collations and their names vary across databases, consult your database's documentation for more information.
See Database functions for more information and examples.