RelationalPropertyExtensions.SetCollation Method

Definition

Overloads

SetCollation(IMutableProperty, String)

Configures a collation to be used for column this property is mapped to.

SetCollation(IConventionProperty, String, Boolean)

Configures a collation to be used for the column this property is mapped to.

SetCollation(IMutableProperty, String)

Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs

Configures a collation to be used for column this property is mapped to.

C#
public static void SetCollation (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string collation);
C#
public static void SetCollation (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string? collation);

Parameters

property
IMutableProperty

The property.

collation
String

The collation for the column.

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 5.0, 6.0, 7.0, 8.0, 9.0

SetCollation(IConventionProperty, String, Boolean)

Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs

Configures a collation to be used for the column this property is mapped to.

C#
public static string SetCollation (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string collation, bool fromDataAnnotation = false);
C#
public static string? SetCollation (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string? collation, bool fromDataAnnotation = false);

Parameters

property
IConventionProperty

The property.

collation
String

The collation for the column.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 5.0, 6.0, 7.0, 8.0, 9.0