SqlServerIndexBuilderExtensions.CanSetSortInTempDb 方法

定義

傳回值,指出目標為 SQL Server時,是否可以在 tempdb 選項中使用排序來設定索引。

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

參數

indexBuilder
IConventionIndexBuilder

要設定之索引的產生器。

sortInTempDb
Nullable<Boolean>

值,指出是否使用 tempdb 選項中的排序建立索引。

fromDataAnnotation
Boolean

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

傳回

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

備註

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

適用於