語言

SqlServerIndexBuilderExtensions.IncludeProperties 方法

定義

多載

名稱 Description
IncludeProperties(IndexBuilder, String[])

設定索引在針對 SQL Server 時包含屬性。

IncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

設定索引在針對 SQL Server 時包含屬性。

IncludeProperties<TEntity>(IndexBuilder<TEntity>, String[])

設定索引在針對 SQL Server 時包含屬性。

IncludeProperties<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>)

設定索引在針對 SQL Server 時包含屬性。

IncludeProperties(IndexBuilder, String[])

來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs

設定索引在針對 SQL Server 時包含屬性。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder IncludeProperties(this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, params string[] propertyNames);
static member IncludeProperties : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
<Extension()>
Public Function IncludeProperties (indexBuilder As IndexBuilder, ParamArray propertyNames As String()) As IndexBuilder

參數

indexBuilder
IndexBuilder

正在設定索引的建置者。

propertyNames
String[]

一組屬性名稱的陣列,用於「include」子句。

傳回

一個建構器來進一步配置索引。

備註

更多資訊與範例請參閱「建模實體類型與關係」,以及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。

適用於

IncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs

設定索引在針對 SQL Server 時包含屬性。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder? IncludeProperties(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder IncludeProperties(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
static member IncludeProperties : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder * System.Collections.Generic.IReadOnlyList<string> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder
<Extension()>
Public Function IncludeProperties (indexBuilder As IConventionIndexBuilder, propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IConventionIndexBuilder

參數

indexBuilder
IConventionIndexBuilder

正在設定索引的建置者。

propertyNames
IReadOnlyList<String>

一組屬性名稱的陣列,用於「include」子句。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

如果設定是套用,則使用同一個建構者實例, null 否則。

備註

更多資訊與範例請參閱「建模實體類型與關係」,以及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。

適用於

IncludeProperties<TEntity>(IndexBuilder<TEntity>, String[])

來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs

設定索引在針對 SQL Server 時包含屬性。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> IncludeProperties<TEntity>(this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, params string[] propertyNames);
static member IncludeProperties : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function IncludeProperties(Of TEntity) (indexBuilder As IndexBuilder(Of TEntity), ParamArray propertyNames As String()) As IndexBuilder(Of TEntity)

類型參數

TEntity

參數

indexBuilder
IndexBuilder<TEntity>

正在設定索引的建置者。

propertyNames
String[]

一組屬性名稱的陣列,用於「include」子句。

傳回

IndexBuilder<TEntity>

一個建構器來進一步配置索引。

備註

更多資訊與範例請參閱「建模實體類型與關係」,以及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。

適用於

IncludeProperties<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>)

來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs
來源:
SqlServerIndexBuilderExtensions.cs

設定索引在針對 SQL Server 時包含屬性。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> IncludeProperties<TEntity>(this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, System.Linq.Expressions.Expression<Func<TEntity,object?>> includeExpression);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> IncludeProperties<TEntity>(this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, System.Linq.Expressions.Expression<Func<TEntity,object>> includeExpression);
static member IncludeProperties : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * System.Linq.Expressions.Expression<Func<'Entity, obj>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function IncludeProperties(Of TEntity) (indexBuilder As IndexBuilder(Of TEntity), includeExpression As Expression(Of Func(Of TEntity, Object))) As IndexBuilder(Of TEntity)

類型參數

TEntity

參數

indexBuilder
IndexBuilder<TEntity>

正在設定索引的建置者。

includeExpression
Expression<Func<TEntity,Object>>

一個lambda表達式,代表「include」子句blog => blog.Url中要包含的屬性。

若需包含多個屬性,則指定包含屬性(post => new { post.Title, post.BlogId })的匿名型態。

傳回

IndexBuilder<TEntity>

一個建構器來進一步配置索引。

備註

更多資訊與範例請參閱「建模實體類型與關係」,以及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。

適用於