SqlServerModelBuilderExtensions.HasPerformanceLevelSql 方法

定义

重载

HasPerformanceLevelSql(ModelBuilder, String)

将 Azure SQL Database 的性能级别 (SERVICE_OBJECTIVE) 配置为 SQL 表达式。

HasPerformanceLevelSql(IConventionModelBuilder, String, Boolean)

尝试为 Azure SQL 数据库配置性能级别 (SERVICE_OBJECTIVE) 。

HasPerformanceLevelSql(ModelBuilder, String)

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

将 Azure SQL Database 的性能级别 (SERVICE_OBJECTIVE) 配置为 SQL 表达式。

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

参数

modelBuilder
ModelBuilder

模型生成器。

performanceLevel
String

数据库性能级别的表达式。

返回

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

注解

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

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

适用于

HasPerformanceLevelSql(IConventionModelBuilder, String, Boolean)

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

尝试为 Azure SQL 数据库配置性能级别 (SERVICE_OBJECTIVE) 。

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

参数

modelBuilder
IConventionModelBuilder

模型生成器。

performanceLevel
String

数据库性能级别的表达式。

fromDataAnnotation
Boolean

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

返回

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

注解

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

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

适用于