Udostępnij przez


DbExpressionBuilder.GroupBy Metoda

Definicja

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.

keys
IEnumerable<KeyValuePair<String,DbExpression>>

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.

Dotyczy