DbExpressionBuilder.GroupBy 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立新的 DbGroupByExpression,它會根據指定的群組索引鍵分組輸入集項目,並套用指定的彙總。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static System.Data.Entity.Core.Common.CommandTrees.DbGroupByExpression GroupBy (this System.Data.Entity.Core.Common.CommandTrees.DbGroupExpressionBinding input, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Data.Entity.Core.Common.CommandTrees.DbExpression>> keys, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Data.Entity.Core.Common.CommandTrees.DbAggregate>> aggregates);
static member GroupBy : System.Data.Entity.Core.Common.CommandTrees.DbGroupExpressionBinding * seq<System.Collections.Generic.KeyValuePair<string, System.Data.Entity.Core.Common.CommandTrees.DbExpression>> * seq<System.Collections.Generic.KeyValuePair<string, System.Data.Entity.Core.Common.CommandTrees.DbAggregate>> -> System.Data.Entity.Core.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。
字串-運算式組的清單,用於定義分組的資料行。
- aggregates
- IEnumerable<KeyValuePair<String,DbAggregate>>
指定要套用之彙總的運算式清單。
傳回
含有指定之輸入集、群組索引鍵和彙總的新 DbGroupByExpression。
- 屬性
例外狀況
輸入、索引鍵或匯總為 Null、索引鍵包含 Null 資料行索引鍵或運算式,或匯總包含 Null 匯總資料行名稱或匯總。
索引鍵和匯總都是空的,或是指定了無效或重複的資料行名稱。