Share via


RelationalPropertyBuilderExtensions.UseCollation 方法

定义

重载

UseCollation(IConventionPropertyBuilder, String, Boolean)

将 属性配置为使用给定的排序规则。 将使用给定的排序规则创建数据库列,并将在所有区分排序规则的操作中隐式使用它。

UseCollation(PropertyBuilder, String)

将 属性配置为使用给定的排序规则。 将使用给定的排序规则创建数据库列,并将在所有区分排序规则的操作中隐式使用它。

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

将 属性配置为使用给定的排序规则。 将使用给定的排序规则创建数据库列,并将在所有区分排序规则的操作中隐式使用它。

UseCollation(IConventionPropertyBuilder, String, Boolean)

将 属性配置为使用给定的排序规则。 将使用给定的排序规则创建数据库列,并将在所有区分排序规则的操作中隐式使用它。

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

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

collation
String

排序规则。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

注解

有关详细信息和示例 ,请参阅数据库排序规则

适用于

UseCollation(PropertyBuilder, String)

将 属性配置为使用给定的排序规则。 将使用给定的排序规则创建数据库列,并将在所有区分排序规则的操作中隐式使用它。

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

参数

propertyBuilder
PropertyBuilder

要配置的属性的生成器。

collation
String

列的排序规则。

返回

同一生成器实例,以便可以链接多个调用。

注解

有关详细信息和示例 ,请参阅数据库排序规则

适用于

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

将 属性配置为使用给定的排序规则。 将使用给定的排序规则创建数据库列,并将在所有区分排序规则的操作中隐式使用它。

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)

类型参数

TProperty

参数

propertyBuilder
PropertyBuilder<TProperty>

要配置的属性的生成器。

collation
String

列的排序规则。

返回

同一生成器实例,以便可以链接多个调用。

注解

有关详细信息和示例 ,请参阅数据库排序规则

适用于