RelationalModelBuilderExtensions.HasDefaultSchema 方法

定义

重载

HasDefaultSchema(IConventionModelBuilder, String, Boolean)

如果未显式配置架构,则配置应在中创建数据库对象的默认架构。

HasDefaultSchema(ModelBuilder, String)

如果未显式配置架构,则配置应在中创建数据库对象的默认架构。

HasDefaultSchema(IConventionModelBuilder, String, Boolean)

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

如果未显式配置架构,则配置应在中创建数据库对象的默认架构。

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

参数

modelBuilder
IConventionModelBuilder

模型生成器。

schema
String

默认架构。

fromDataAnnotation
Boolean

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

返回

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

注解

有关详细信息和示例,请参阅 为实体类型和关系建模

适用于

HasDefaultSchema(ModelBuilder, String)

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

如果未显式配置架构,则配置应在中创建数据库对象的默认架构。

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

参数

modelBuilder
ModelBuilder

模型生成器。

schema
String

默认架构。

返回

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

注解

有关详细信息和示例,请参阅 为实体类型和关系建模

适用于