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

 

Orders the query results by the specified criteria.

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

public ObjectQuery<T> OrderBy(
	string keys,
	params ObjectParameter[] parameters
)

Parameters

keys
Type: System.String

The key columns by which to order the results.

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<T>

A new ObjectQuery<T> instance that is equivalent to the original instance with ORDER BY applied.

Exception Condition
ArgumentNullException

The keys or parameters parameter is null.

ArgumentException

The key is an empty string.