DbExpressionBuilder.CrossApply-Methode (DbExpression, Func<DbExpression, KeyValuePair<String, DbExpression>>)
[Diese Seite bezieht sich auf Entity Framework Version 6. Die neueste Version ist als 'Entity Framework' NuGet-Paket verfügbar. Weitere Informationen zu Entity Framework finden Sie unter msdn.com/data/ef.]
Erstellt einen neuen DbApplyExpression, der den angegebenen apply-Ausdruck für jedes Element eines angegebenen Eingabesets einmal auswertet und eine Auflistung von Zeilen mit entsprechenden Eingabe- und Übernahmespalten erzeugt. Zeilen, für die apply als leere Menge ausgewertet wird, werden nicht eingeschlossen.
Namespace: System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
<ExtensionAttribute> _
Public Shared Function CrossApply ( _
source As DbExpression, _
apply As Func(Of DbExpression, KeyValuePair(Of String, DbExpression)) _
) As DbApplyExpression
'Usage
Dim source As DbExpression
Dim apply As Func(Of DbExpression, KeyValuePair(Of String, DbExpression))
Dim returnValue As DbApplyExpression
returnValue = source.CrossApply(apply)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static DbApplyExpression CrossApply(
this DbExpression source,
Func<DbExpression, KeyValuePair<string, DbExpression>> apply
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
[ExtensionAttribute]
public:
static DbApplyExpression^ CrossApply(
DbExpression^ source,
Func<DbExpression^, KeyValuePair<String^, DbExpression^>>^ apply
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
static member CrossApply :
source:DbExpression *
apply:Func<DbExpression, KeyValuePair<string, DbExpression>> -> DbApplyExpression
public static function CrossApply(
source : DbExpression,
apply : Func<DbExpression, KeyValuePair<String, DbExpression>>
) : DbApplyExpression
Parameter
- source
Typ: System.Data.Entity.Core.Common.CommandTrees.DbExpression
Ein DbExpression, das das Eingabeset angibt.
- apply
Typ: System.Func<DbExpression, KeyValuePair<String, DbExpression>>
Eine Methode, die die Logik angibt, die für jeden Member des Eingabesets einmal ausgewertet wird.
Rückgabewert
Typ: System.Data.Entity.Core.Common.CommandTrees.DbApplyExpression
Ein neues DbApplyExpression mit den angegebenen Eingabe- und Übernahmebindungen und ein DbExpressionKind von CrossApply.
Hinweis zur Verwendung
In Visual Basic und C# können Sie diese Methode als Instanzenmethode für ein beliebiges Objekt vom Typ DbExpression aufrufen. Bei Verwendung der Syntax für Instanzenmethoden lassen Sie den ersten Parameter aus. Weitere Informationen finden Sie unter https://msdn.microsoft.com/de-de/library/bb384936(v=vs.113) oder https://msdn.microsoft.com/de-de/library/bb383977(v=vs.113).
Ausnahmen
Ausnahme | Bedingung |
---|---|
ArgumentNullException | source oder apply ist null. |
ArgumentException | source weist keinen Auflistungsergebnistyp auf. |
ArgumentNullException | Das Ergebnis von apply enthält einen Namen oder Ausdruck, der Null ist. |
ArgumentException | Das Ergebnis von apply enthält einen Namen oder Ausdruck, der in einer Ausdrucksbindung ungültig ist. |
Siehe auch
Verweis
System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder-Namespace