Share via


DbExpressionBuilder.GroupBy メソッド

定義

指定されたグループ キーに従って入力セットの要素をグループ化し、指定された集約を適用する新しい DbGroupByExpression を作成します。

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

パラメーター

input
DbGroupExpressionBinding

入力セットを指定する DbGroupExpressionBinding

keys
IEnumerable<KeyValuePair<String,DbExpression>>

グループ化列を定義する文字列/式ペアのリスト。

aggregates
IEnumerable<KeyValuePair<String,DbAggregate>>

適用する集計を指定する式のリスト。

戻り値

指定された入力セット、グループ化キー、および集計を持つ新しい DbGroupByExpression。

例外

inputkeys または aggregates null、null keys 列キーまたは式を含むか、 aggregates null 集計列名または集計を含みます。

keysaggregates がどちらも空であるか、無効な列名または重複する列名が指定されました。

注釈

DbGroupByExpression では、キーの一覧または集計の一覧を空にできますが、両方は使用できません。

適用対象