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

입력 집합을 지정하는 A DbGroupExpressionBinding 입니다.

keys
IEnumerable<KeyValuePair<String,DbExpression>>

그룹화 열을 정의하는 문자열 식 쌍의 목록입니다.

aggregates
IEnumerable<KeyValuePair<String,DbAggregate>>

적용할 집계를 지정하는 식 목록입니다.

반품

지정된 입력 집합, 그룹화 키 및 집계가 있는 새 DbGroupByExpression입니다.

예외

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

aggregates 둘 다 keys 비어 있거나 잘못되었거나 중복된 열 이름을 지정했습니다.

설명

DbGroupByExpression을 사용하면 키 목록이나 집계 목록이 비어 있지만 둘 다 비어 있는 것은 아닙니다.

적용 대상