RelationalDbFunctionsExtensions.Collate<TProperty> Method

Definition

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 Microsoft.EntityFrameworkCore.DbFunctions _, TProperty operand, string collation);
static member Collate : Microsoft.EntityFrameworkCore.DbFunctions * 'Property * string -> 'Property
<Extension()>
Public Function Collate(Of TProperty) (_ As DbFunctions, operand As TProperty, collation As String) As TProperty

Type Parameters

TProperty

The type of the operand on which the collation is being specified.

Parameters

_
DbFunctions

The DbFunctions instance.

operand
TProperty

The operand to which to apply the collation.

collation
String

The name of the collation.

Returns

TProperty

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.

Applies to