SqlServerModelBuilderExtensions.HasServiceTierSql 方法

定义

重载

HasServiceTierSql(ModelBuilder, String)

将 Azure SQL Database 的服务层 (EDITION) 配置为 SQL 表达式。

HasServiceTierSql(IConventionModelBuilder, String, Boolean)

尝试为 Azure SQL 数据库配置服务层 (EDITION) 。

HasServiceTierSql(ModelBuilder, String)

Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs

将 Azure SQL Database 的服务层 (EDITION) 配置为 SQL 表达式。

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

参数

modelBuilder
ModelBuilder

模型生成器。

serviceTier
String

数据库服务层的表达式。

返回

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

注解

有关支持的值,请参阅Azure SQL数据库文档。

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于

HasServiceTierSql(IConventionModelBuilder, String, Boolean)

Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs
Source:
SqlServerModelBuilderExtensions.cs

尝试为 Azure SQL 数据库配置服务层 (EDITION) 。

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

参数

modelBuilder
IConventionModelBuilder

模型生成器。

serviceTier
String

数据库服务层的表达式。

fromDataAnnotation
Boolean

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

返回

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

注解

有关支持的值,请参阅Azure SQL数据库文档。

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于