Share via


RelationalPropertyBuilderExtensions.UseCollation Method

Definition

Overloads

UseCollation(IConventionPropertyBuilder, String, Boolean)

Configures the property to use the given collation. The database column will be created with the given collation, and it will be used implicitly in all collation-sensitive operations.

UseCollation(PropertyBuilder, String)

Configures the property to use the given collation. The database column will be created with the given collation, and it will be used implicitly in all collation-sensitive operations.

UseCollation<TProperty>(PropertyBuilder<TProperty>, String)

Configures the property to use the given collation. The database column will be created with the given collation, and it will be used implicitly in all collation-sensitive operations.

UseCollation(IConventionPropertyBuilder, String, Boolean)

Configures the property to use the given collation. The database column will be created with the given collation, and it will be used implicitly in all collation-sensitive operations.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder UseCollation (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string collation, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? UseCollation (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string? collation, bool fromDataAnnotation = false);
static member UseCollation : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
<Extension()>
Public Function UseCollation (propertyBuilder As IConventionPropertyBuilder, collation As String, Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

collation
String

The collation.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Remarks

See Database collations for more information and examples.

Applies to

UseCollation(PropertyBuilder, String)

Configures the property to use the given collation. The database column will be created with the given collation, and it will be used implicitly in all collation-sensitive operations.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder UseCollation (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string collation);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder UseCollation (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string? collation);
static member UseCollation : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function UseCollation (propertyBuilder As PropertyBuilder, collation As String) As PropertyBuilder

Parameters

propertyBuilder
PropertyBuilder

The builder for the property being configured.

collation
String

The collation for the column.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Database collations for more information and examples.

Applies to

UseCollation<TProperty>(PropertyBuilder<TProperty>, String)

Configures the property to use the given collation. The database column will be created with the given collation, and it will be used implicitly in all collation-sensitive operations.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> UseCollation<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string collation);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> UseCollation<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string? collation);
static member UseCollation : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function UseCollation(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), collation As String) As PropertyBuilder(Of TProperty)

Type Parameters

TProperty

Parameters

propertyBuilder
PropertyBuilder<TProperty>

The builder for the property being configured.

collation
String

The collation for the column.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Database collations for more information and examples.

Applies to