Freigeben über


Gruppierungsmethoden (LINQ to Entities)

Die meisten der LINQ-Gruppierungsmethoden werden in LINQ-to-Entities unterstützt. Davon ausgenommen sind die Methoden, denen ein IEqualityComparer übergeben wird, da der Vergleich nicht für die Datenquelle übersetzt werden kann. Weitere Informationen finden Sie unter Standardabfrageoperatoren in LINQ to Entities-Abfragen. In der folgenden Tabelle sind die unterstützten und nicht unterstützten Gruppierungsmethoden aufgeführt.

Unterstützte und nicht unterstützte Methoden

Methode Unterstützung Visual Basic-Funktionssignatur C#-Methodensignatur

GroupBy

Wird unterstützt

Function GroupBy(Of TSource, TKey) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)) _
) As IQueryable(Of IGrouping(Of TKey, TSource))
IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(
this IQueryable<TSource> source,
Expression<Func<TSource, TKey>> keySelector
)

GroupBy

Nicht unterstützt

Function GroupBy(Of TSource, TKey) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)), _
comparer As IEqualityComparer(Of TKey) _
) As IQueryable(Of IGrouping(Of TKey, TSource))
IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(
this IQueryable<TSource> source,
Expression<Func<TSource, TKey>> keySelector,
IEqualityComparer<TKey> comparer
)

GroupBy

Wird unterstützt

Function GroupBy(Of TSource, TKey, TElement) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)), _
elementSelector As Expression(Of Func(Of TSource, TElement)) _
) As IQueryable(Of IGrouping(Of TKey, TElement))
IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(
this IQueryable<TSource> source,
Expression<Func<TSource, TKey>> keySelector,
Expression<Func<TSource, TElement>> elementSelector
)

GroupBy

Wird unterstützt

Function GroupBy(Of TSource, TKey, TResult) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)), _
resultSelector As Expression(Of Func(Of TKey, IEnumerable(Of TSource), TResult)) _
) As IQueryable(Of TResult)
IQueryable<TResult> GroupBy<TSource, TKey, TResult>(
this IQueryable<TSource> source,
Expression<Func<TSource, TKey>> keySelector,
Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector
)

GroupBy

Nicht unterstützt

Function GroupBy(Of TSource, TKey, TElement) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)), _
elementSelector As Expression(Of Func(Of TSource, TElement)), _
comparer As IEqualityComparer(Of TKey) _
) As IQueryable(Of IGrouping(Of TKey, TElement))
IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(
this IQueryable<TSource> source,
Expression<Func<TSource, TKey>> keySelector,
Expression<Func<TSource, TElement>> elementSelector,
IEqualityComparer<TKey> comparer

GroupBy

Wird unterstützt

Function GroupBy(Of TSource, TKey, TElement, TResult) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)), _
elementSelector As Expression(Of Func(Of TSource, TElement)), _
resultSelector As Expression(Of Func(Of TKey, IEnumerable(Of TElement), TResult)) _
) As IQueryable(Of TResult)
IQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(
this IQueryable<TSource> source,
Expression<Func<TSource, TKey>> keySelector,
Expression<Func<TSource, TElement>> elementSelector,
Expression<Func<TKey, IEnumerable<TElement>, TResult>> resultSelector
)

GroupBy

Nicht unterstützt

Function GroupBy(Of TSource, TKey, TResult) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)), _
resultSelector As Expression(Of Func(Of TKey, IEnumerable(Of TSource), TResult)), _
comparer As IEqualityComparer(Of TKey) _
) As IQueryable(Of TResult)
IQueryable<TResult> GroupBy<TSource, TKey, TResult>(
this IQueryable<TSource> source,
Expression<Func<TSource, TKey>> keySelector,
Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector,
IEqualityComparer<TKey> comparer
)

GroupBy

Nicht unterstützt

Function GroupBy(Of TSource, TKey, TElement, TResult) ( _
source As IQueryable(Of TSource), _
keySelector As Expression(Of Func(Of TSource, TKey)), _
elementSelector As Expression(Of Func(Of TSource, TElement)), _
resultSelector As Expression(Of Func(Of TKey, IEnumerable(Of TElement), TResult)), _
comparer As IEqualityComparer(Of TKey) _
) As IQueryable(Of TResult)
IQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(
this IQueryable<TSource> source,
Expression<Func<TSource, TKey>> keySelector,
Expression<Func<TSource, TElement>> elementSelector,
Expression<Func<TKey, IEnumerable<TElement>, TResult>> resultSelector,
IEqualityComparer<TKey> comparer
)

Siehe auch

Konzepte

Unterstützte und nicht unterstützte Methoden (LINQ to Entities)