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 toplamları belirten ifadelerin listesi.

Döndürülenler

Belirtilen giriş kümesine, gruplandırma anahtarlarına ve toplamalara sahip yeni bir DbGroupByExpression.

Özel durumlar

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

Her ikisi de keysaggregates boş veya geçersiz veya yinelenen bir sütun adı belirtildi.

Açıklamalar

DbGroupByExpression, anahtar listesinin veya toplama listesinin boş olmasını sağlar, ancak ikisini birden izin vermez.

Şunlara uygulanır