RelationalModelBuilderExtensions.CanSetCollation 方法

定义

返回一个值,该值指示是否可以将给定排序规则设置为默认值。

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

参数

modelBuilder
IConventionModelBuilder

模型生成器。

collation
String

排序规则。

fromDataAnnotation
Boolean

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

返回

true 如果给定排序规则可以设置为默认值,则为 。

注解

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

适用于