DbExpressionBuilder.GroupBy Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Tworzy nowy DbGroupByExpression element, który grupuje elementy zestawu danych wejściowych zgodnie z określonymi kluczami grupy i stosuje podane agregacje.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static System.Data.Entity.Core.Common.CommandTrees.DbGroupByExpression GroupBy(this System.Data.Entity.Core.Common.CommandTrees.DbGroupExpressionBinding input, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Data.Entity.Core.Common.CommandTrees.DbExpression>> keys, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Data.Entity.Core.Common.CommandTrees.DbAggregate>> aggregates);
static member GroupBy : System.Data.Entity.Core.Common.CommandTrees.DbGroupExpressionBinding * seq<System.Collections.Generic.KeyValuePair<string, System.Data.Entity.Core.Common.CommandTrees.DbExpression>> * seq<System.Collections.Generic.KeyValuePair<string, System.Data.Entity.Core.Common.CommandTrees.DbAggregate>> -> System.Data.Entity.Core.Common.CommandTrees.DbGroupByExpression
<Extension()>
Public Function GroupBy (input As DbGroupExpressionBinding, keys As IEnumerable(Of KeyValuePair(Of String, DbExpression)), aggregates As IEnumerable(Of KeyValuePair(Of String, DbAggregate))) As DbGroupByExpression
Parametry
- input
- DbGroupExpressionBinding
Element DbGroupExpressionBinding określający zestaw danych wejściowych.
Lista par wyrażeń ciągów, które definiują kolumny grupowania.
- aggregates
- IEnumerable<KeyValuePair<String,DbAggregate>>
Lista wyrażeń określających agregacje do zastosowania.
Zwraca
Nowa grupa DbGroupByExpression z określonym zestawem danych wejściowych, grupowanie kluczy i agregacji.
- Atrybuty
Wyjątki
dane wejściowe, klucze lub agregacje mają wartość null, klucze zawierają klucz kolumny null lub wyrażenie albo agregacje zawierają nazwę kolumny agregującej null lub agregację.
Zarówno klucze, jak i agregacje są puste lub określono nieprawidłową lub zduplikowaną nazwę kolumny.