ObjectQuery<T>.GroupBy Method (String, String, ObjectParameter[])

 

Groups the query results by the specified criteria.

Namespace:   System.Data.Entity.Core.Objects
Assembly:  EntityFramework (in EntityFramework.dll)

public ObjectQuery<DbDataRecord> GroupBy(
	string keys,
	string projection,
	params ObjectParameter[] parameters
)

Parameters

keys
Type: System.String

The key columns by which to group the results.

projection
Type: System.String

The list of selected properties that defines the projection.

parameters
Type: System.Data.Entity.Core.Objects.ObjectParameter[]

Zero or more parameters that are used in this method.

Return Value

Type: System.Data.Entity.Core.Objects.ObjectQuery<DbDataRecord>

A new ObjectQuery<T> instance of type DbDataRecord that is equivalent to the original instance with GROUP BY applied.

Exception Condition
ArgumentNullException

The query parameter is null or an empty string or the projection parameter is null or an empty string.