ObjectQuery<T>.OrderBy Method (String, ObjectParameter[])
Orders the query results by the specified criteria.
Assembly: EntityFramework (in EntityFramework.dll)
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. |