RelationalModelBuilderExtensions.CanSetDefaultSchema 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一個值,表示該結構是否可設定為預設值。
public static bool CanSetDefaultSchema(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, string? schema, bool fromDataAnnotation = false);
public static bool CanSetDefaultSchema(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, string schema, bool fromDataAnnotation = false);
static member CanSetDefaultSchema : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * string * bool -> bool
<Extension()>
Public Function CanSetDefaultSchema (modelBuilder As IConventionModelBuilder, schema As String, Optional fromDataAnnotation As Boolean = false) As Boolean
參數
- modelBuilder
- IConventionModelBuilder
模型建構器。
- schema
- String
預設的模式。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
true 如果給定的結構可以設為預設。
備註
更多資訊與範例請參閱 建模實體類型與關係 。