RelationalModelBuilderExtensions.UseCollation 方法

定义

重载

UseCollation(ModelBuilder, String)

配置数据库排序规则,该排序规则将由所有列在没有显式排序规则的情况下使用。

UseCollation(IConventionModelBuilder, String, Boolean)

配置数据库排序规则,该排序规则将由所有列在没有显式排序规则的情况下使用。

UseCollation(ModelBuilder, String)

Source:
RelationalModelBuilderExtensions.cs
Source:
RelationalModelBuilderExtensions.cs
Source:
RelationalModelBuilderExtensions.cs
Source:
RelationalModelBuilderExtensions.cs
Source:
RelationalModelBuilderExtensions.cs

配置数据库排序规则,该排序规则将由所有列在没有显式排序规则的情况下使用。

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

参数

modelBuilder
ModelBuilder

模型生成器。

collation
String

排序规则。

返回

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

注解

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

适用于

UseCollation(IConventionModelBuilder, String, Boolean)

Source:
RelationalModelBuilderExtensions.cs
Source:
RelationalModelBuilderExtensions.cs
Source:
RelationalModelBuilderExtensions.cs
Source:
RelationalModelBuilderExtensions.cs
Source:
RelationalModelBuilderExtensions.cs

配置数据库排序规则,该排序规则将由所有列在没有显式排序规则的情况下使用。

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

参数

modelBuilder
IConventionModelBuilder

模型生成器。

collation
String

排序规则。

fromDataAnnotation
Boolean

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

返回

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

注解

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

适用于