DbExpressionBuilder.GroupBy Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Vytvoří novou DbGroupByExpression , která seskupí prvky vstupní sady podle zadaných klíčů skupiny a použije dané agregace.
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
A DbGroupExpressionBinding , který určuje vstupní sadu.
Seznam dvojic řetězcových výrazů, které definují sloupce seskupování.
- aggregates
- IEnumerable<KeyValuePair<String,DbAggregate>>
Seznamvýrazch
Návraty
Nový DbGroupByExpression se zadanou vstupní sadou, seskupovacími klíči a agregacemi.
Výjimky
inputnebo keys má hodnotu null, aggregates obsahuje klíč nebo výraz sloupce s hodnotou null nebo keys obsahuje název nebo agregaci sloupce s hodnotou aggregates null.
Oba keys a aggregates jsou prázdné, nebo byl zadán neplatný nebo duplicitní název sloupce.
Poznámky
DbGroupByExpression umožňuje, aby byl seznam klíčů nebo seznam agregací prázdný, ale ne oba.