SqlServerModelBuilderExtensions.CanSetPerformanceLevelSql 方法

定義

傳回值,指出指定的值是否可以設定為資料庫的效能等級。

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

參數

modelBuilder
IConventionModelBuilder

模型產生器。

performanceLevel
String

資料庫運算式的效能層級。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

true 如果指定的值可以設定為資料庫的效能層級,則為 。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及存取SQL Server和Azure SQL資料庫

適用於