共用方式為


DbExpressionBuilder.Select<TProjection> 方法

定義

建立新的 DbProjectExpression,它會依據給定的輸入集選取指定的運算式。

public static System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression Select<TProjection> (this System.Data.Entity.Core.Common.CommandTrees.DbExpression source, Func<System.Data.Entity.Core.Common.CommandTrees.DbExpression,TProjection> projection);
static member Select : System.Data.Entity.Core.Common.CommandTrees.DbExpression * Func<System.Data.Entity.Core.Common.CommandTrees.DbExpression, 'Projection> -> System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression
<Extension()>
Public Function Select(Of TProjection) (source As DbExpression, projection As Func(Of DbExpression, TProjection)) As DbProjectExpression

類型參數

TProjection

投影的方法結果類型。

參數

source
DbExpression

指定輸入集的運算式。

projection
Func<DbExpression,TProjection>

方法,指定如何透過輸入集成員衍生投影的運算式。 這個方法必須產生與 Select 相容的型別實例,而且可以解析為 DbExpression 。 TProjection 的相容性需求詳述於<備註>。

傳回

表示選取作業的新 DbProjectExpression。

例外狀況

投影的結果為 Null。

適用於