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
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'
.
The available collations and their names vary across databases, consult your database's documentation for more information.
public static TProperty Collate<TProperty>(this DbFunctions _, TProperty operand, string collation)
Parameters
_
DbFunctionsThe 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.