QueryableExtensionsGroupBy Method (IQueryable, LambdaExpression) |
Groups the elements of a sequence according to a specified key selector function.
Namespace: Kettic.AspNet.Data.ExtensionsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntaxpublic static IQueryable GroupBy(
this IQueryable source,
LambdaExpression keySelector
)
<ExtensionAttribute>
Public Shared Function GroupBy (
source As IQueryable,
keySelector As LambdaExpression
) As IQueryable
public:
[ExtensionAttribute]
static IQueryable^ GroupBy(
IQueryable^ source,
LambdaExpression^ keySelector
)
static member GroupBy :
source : IQueryable *
keySelector : LambdaExpression -> IQueryable
Parameters
- source
- Type: System.LinqIQueryable
An IQueryable whose elements to group. - keySelector
- Type: System.Linq.ExpressionsLambdaExpression
A function to extract the key for each element.
Return Value
Type:
IQueryable
An
IQueryable with
IGroupingTKey, TElement items,
whose elements contains a sequence of objects and a key.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IQueryable. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also