DbExpressionBuilder.CrossApply 方法 (DbExpressionBinding, DbExpressionBinding)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
建立新的 DbApplyExpression,它會針對給定輸入集的每個項目評估給定的 apply 運算式一次,以產生具有對應的輸入和套用資料行的資料列集合。 其中不包含 apply 評估為空集合的資料列。
命名空間: System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<ExtensionAttribute> _
Public Shared Function CrossApply ( _
input As DbExpressionBinding, _
apply As DbExpressionBinding _
) As DbApplyExpression
'用途
Dim input As DbExpressionBinding
Dim apply As DbExpressionBinding
Dim returnValue As DbApplyExpression
returnValue = input.CrossApply(apply)
public static DbApplyExpression CrossApply(
this DbExpressionBinding input,
DbExpressionBinding apply
)
[ExtensionAttribute]
public:
static DbApplyExpression^ CrossApply(
DbExpressionBinding^ input,
DbExpressionBinding^ apply
)
static member CrossApply :
input:DbExpressionBinding *
apply:DbExpressionBinding -> DbApplyExpression
public static function CrossApply(
input : DbExpressionBinding,
apply : DbExpressionBinding
) : DbApplyExpression
參數
- input
類型:System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding
指定輸入集的 DbExpressionBinding。
- apply
類型:System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding
指定要針對輸入集中每個成員進行一次評估之邏輯的 DbExpressionBinding。
傳回值
類型:System.Data.Entity.Core.Common.CommandTrees.DbApplyExpression
具有指定輸入及套用繫結與 CrossApply 之 DbExpressionKind 的新 DbApplyExpression。
使用注意事項
在 Visual Basic 和 C# 中,您可以在任何 DbExpressionBinding 類型物件中呼叫這個方法以做為執行個體。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 https://msdn.microsoft.com/zh-tw/library/bb384936(v=vs.113)或 https://msdn.microsoft.com/zh-tw/library/bb383977(v=vs.113)。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | input 或 apply 為 null。 |
請參閱
參考
System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder 命名空間