共用方式為


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 如果指定的定序可以設定為預設值,則為 。

備註

如需詳細資訊和範例 ,請參閱資料庫定 序。

適用於