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.
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbGroupByExpression ^ GroupBy(System::Data::Common::CommandTrees::DbGroupExpressionBinding ^ input, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Data::Common::CommandTrees::DbExpression ^>> ^ keys, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Data::Common::CommandTrees::DbAggregate ^>> ^ aggregates);
public static System.Data.Common.CommandTrees.DbGroupByExpression GroupBy(this System.Data.Common.CommandTrees.DbGroupExpressionBinding input, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Data.Common.CommandTrees.DbExpression>> keys, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Data.Common.CommandTrees.DbAggregate>> aggregates);
static member GroupBy : System.Data.Common.CommandTrees.DbGroupExpressionBinding * seq<System.Collections.Generic.KeyValuePair<string, System.Data.Common.CommandTrees.DbExpression>> * seq<System.Collections.Generic.KeyValuePair<string, System.Data.Common.CommandTrees.DbAggregate>> -> System.Data.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 ciąg-wyrażenie, które definiują kolumny grupowania.
- aggregates
- IEnumerable<KeyValuePair<String,DbAggregate>>
Lista wyrażeń, które określają agregacje do zastosowania.
Zwraca
Nowa grupa DbGroupByExpression z określonym zestawem danych wejściowych, grupowanie kluczy i agregacji.
Wyjątki
input, keys lub aggregates ma wartość null, keys zawiera klucz kolumny null lub wyrażenie albo aggregates zawiera nazwę kolumny agregującej null lub agregację.
Obie keys wartości i aggregates są puste lub określono nieprawidłową lub zduplikowaną nazwę kolumny.
Uwagi
Funkcja DbGroupByExpression umożliwia, aby lista kluczy lub lista agregacji była pusta, ale nie obie.