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입니다.

예외

input또는 keysaggregates 가 null이거나, keys null 열 키 또는 식을 포함하거나 aggregates , null 집계 열 이름 또는 집계를 포함합니다.

keysaggregates 모두 비어 있거나 잘못되었거나 중복 열 이름이 지정되었습니다.

설명

DbGroupByExpression을 사용하면 키 목록 또는 집계 목록이 비어 있지만 둘 다 비어 있을 수는 없습니다.

적용 대상