SqlServerIndexBuilderExtensions.CanSetIsCreatedOnline 方法

定義

傳回值,指出當以SQL Server為目標時,是否可以使用線上選項來設定索引。

public static bool CanSetIsCreatedOnline (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, bool? createdOnline, bool fromDataAnnotation = false);
static member CanSetIsCreatedOnline : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder * Nullable<bool> * bool -> bool
<Extension()>
Public Function CanSetIsCreatedOnline (indexBuilder As IConventionIndexBuilder, createdOnline As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

indexBuilder
IConventionIndexBuilder

要設定之索引的產生器。

createdOnline
Nullable<Boolean>

值,指出是否使用線上選項建立索引。

fromDataAnnotation
Boolean

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

傳回

如果套用組態,則為相同的產生器實例, null 否則為 。

備註

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

適用於