DbExpressionBuilder.GroupBy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new DbGroupByExpression that groups the elements of the input set according to the specified group keys and applies the given aggregates.
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
Parameters
- input
- DbGroupExpressionBinding
A DbGroupExpressionBinding that specifies the input set.
A list of string-expression pairs that define the grouping columns.
- aggregates
- IEnumerable<KeyValuePair<String,DbAggregate>>
A list of expressions that specify aggregates to apply.
Returns
A new DbGroupByExpression with the specified input set, grouping keys and aggregates.
Exceptions
input
, keys
or aggregates
is null, keys
contains a null column key or expression, or aggregates
contains a null aggregate column name or aggregate.
Both keys
and aggregates
are empty, or an invalid or duplicate column name was specified.
Remarks
DbGroupByExpression allows either the list of keys or the list of aggregates to be empty, but not both.
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για