共用方式為


RelationalEntityTypeBuilderExtensions.CanSetComment 方法

定義

傳回值,指出是否可以使用指定的組態來源為這個實體類型設定批註。

public static bool CanSetComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, string comment, bool fromDataAnnotation = false);
public static bool CanSetComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, string? comment, bool fromDataAnnotation = false);
static member CanSetComment : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * string * bool -> bool
<Extension()>
Public Function CanSetComment (entityTypeBuilder As IConventionEntityTypeBuilder, comment As String, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

entityTypeBuilder
IConventionEntityTypeBuilder

要設定之實體類型的產生器。

comment
String

資料表的批註。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

true 如果可以套用組態,則為 。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於