Share via


DbExpressionBuilder.GroupBy Yöntem

Tanım

Giriş kümesinin öğelerini belirtilen grup anahtarlarına göre gruplandıran ve verilen toplamları uygulayan yeni DbGroupByExpression bir oluşturur.

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

Parametreler

input
DbGroupExpressionBinding

DbGroupExpressionBinding Giriş kümesini belirten bir.

keys
IEnumerable<KeyValuePair<String,DbExpression>>

Gruplandırma sütunlarını tanımlayan dize-ifade çiftlerinin listesi.

aggregates
IEnumerable<KeyValuePair<String,DbAggregate>>

Uygulanacak toplamaları belirten ifadelerin listesi.

Döndürülenler

Belirtilen giriş kümesi, gruplandırma anahtarları ve toplamalar ile yeni bir DbGroupByExpression.

Özel durumlar

inputveya keysaggregates null, keys null sütun anahtarı veya ifadesi içerir ya da aggregates null toplama sütun adı veya toplama içerir.

aggregates Ve'nin her ikisi de keys boş veya geçersiz veya yinelenen sütun adı belirtildi.

Açıklamalar

DbGroupByExpression, anahtar listesinin veya toplama listesinin boş olmasını sağlar, ancak her ikisini birden değil.

Şunlara uygulanır