SqlServerIndexBuilderExtensions.ForSqlServerInclude 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ForSqlServerInclude(IndexBuilder, String[]) |
已淘汰.
設定索引在目標SQL Server時包含屬性。 |
ForSqlServerInclude(IConventionIndexBuilder, IReadOnlyList<String>, Boolean) |
已淘汰.
設定索引在目標SQL Server時包含屬性。 |
ForSqlServerInclude<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>) |
已淘汰.
設定索引在目標SQL Server時包含屬性。 |
ForSqlServerInclude(IndexBuilder, String[])
警告
Use IncludeProperties
設定索引在目標SQL Server時包含屬性。
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder ForSqlServerInclude (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, params string[] propertyNames);
[System.Obsolete("Use IncludeProperties")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder ForSqlServerInclude (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, params string[] propertyNames);
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
[<System.Obsolete("Use IncludeProperties")>]
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
<Extension()>
Public Function ForSqlServerInclude (indexBuilder As IndexBuilder, ParamArray propertyNames As String()) As IndexBuilder
參數
- indexBuilder
- IndexBuilder
要設定之索引的產生器。
- propertyNames
- String[]
要用於 'include' 子句的屬性名稱陣列。
傳回
進一步設定索引的建立器。
- 屬性
適用於
ForSqlServerInclude(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)
警告
Use IncludeProperties
設定索引在目標SQL Server時包含屬性。
[System.Obsolete("Use IncludeProperties")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder ForSqlServerInclude (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
[<System.Obsolete("Use IncludeProperties")>]
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder * System.Collections.Generic.IReadOnlyList<string> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder
<Extension()>
Public Function ForSqlServerInclude (indexBuilder As IConventionIndexBuilder, propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IConventionIndexBuilder
參數
- indexBuilder
- IConventionIndexBuilder
要設定之索引的產生器。
- propertyNames
- IReadOnlyList<String>
要用於 'include' 子句的屬性名稱陣列。
- fromDataAnnotation
- Boolean
指出是否使用資料批註來指定組態。
傳回
如果套用組態,則為相同的產生器實例, null
否則為 。
- 屬性
適用於
ForSqlServerInclude<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>)
警告
Use IncludeProperties
設定索引在目標SQL Server時包含屬性。
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> ForSqlServerInclude<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, System.Linq.Expressions.Expression<Func<TEntity,object>> includeExpression);
[System.Obsolete("Use IncludeProperties")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> ForSqlServerInclude<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, System.Linq.Expressions.Expression<Func<TEntity,object>> includeExpression);
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * System.Linq.Expressions.Expression<Func<'Entity, obj>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
[<System.Obsolete("Use IncludeProperties")>]
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * System.Linq.Expressions.Expression<Func<'Entity, obj>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function ForSqlServerInclude(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>
進一步設定索引的建立器。
- 屬性