Share via


SqlServerModelBuilderExtensions.HasServiceTierSql Method

Definition

Overloads

HasServiceTierSql(ModelBuilder, String)

Configures the service tier (EDITION) for Azure SQL Database as a SQL expression.

HasServiceTierSql(IConventionModelBuilder, String, Boolean)

Attempts to configure the service tier (EDITION) for Azure SQL Database.

HasServiceTierSql(ModelBuilder, String)

Configures the service tier (EDITION) for Azure SQL Database as a SQL expression.

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

Parameters

modelBuilder
ModelBuilder

The model builder.

serviceTier
String

The expression for the service tier of the database.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Azure SQL Database documentation for supported values.

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

HasServiceTierSql(IConventionModelBuilder, String, Boolean)

Attempts to configure the service tier (EDITION) for Azure SQL Database.

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

Parameters

modelBuilder
IConventionModelBuilder

The model builder.

serviceTier
String

The expression for the service tier of the database.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Remarks

See Azure SQL Database documentation for supported values.

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to