SqlServerModelBuilderExtensions.CanSetServiceTierSql Method

Definition

Returns a value indicating whether the given value can be set as the service tier of the database.

C#
public static bool CanSetServiceTierSql (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, string serviceTier, bool fromDataAnnotation = false);
C#
public static bool CanSetServiceTierSql (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, string? serviceTier, bool fromDataAnnotation = false);

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

true if the given value can be set as the service tier of the database.

Remarks

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

Applies to

Product Versions
Entity Framework Core 3.1, 5.0, 6.0, 7.0, 8.0, 9.0