It seems you cannot sort the children collection in your query.
Either sort after the query or load the children in a second query.
Similar question and answer here
More Related Contents:
- Linq: help me to make this work
- ‘Contains()’ workaround using Linq to Entities?
- Entity Framework (EF) Code First Cascade Delete for One-to-Zero-or-One relationship
- How to use a string to create a EF order by expression?
- The type of one of the expressions in the join clause is incorrect in Entity Framework
- LEFT JOIN in LINQ to entities?
- How to compare only date components from DateTime in EF?
- How to Bulk Update records in Entity Framework?
- Entity Framework 6 Code First Custom Functions
- Entity Framework. Delete all rows in table
- “The LINQ expression node type ‘Invoke’ is not supported in LINQ to Entities” – stumped!
- Mapping Database Views to EF 5.0 Code First w/Migrations
- LINQ to Entities does not recognize the method ‘System.Web.Mvc.FileResult’
- Order by dynamic parameter
- EF migration for changing data type of columns
- LINQ, Unable to create a constant value of type XXX. Only primitive types or enumeration types are supported in this context
- Dynamic table name in linq [duplicate]
- Linq Syntax – Selecting multiple columns
- Join and Include in Entity Framework
- Linq to Entity Join table with multiple OR conditions
- Creating dynamic queries with entity framework
- Log Queries executed by Entity Framework DbContext
- EF5 Getting this error message: Model compatibility cannot be checked because the database does not contain model metadata
- Remove item from list based on condition
- How to group by DateTime.Date in EntityFramework
- Linq Query keeps throwing “Unable to create a constant value of type System.Object….”, Why?
- How to include() nested child entity in linq
- Should the order of LINQ query clauses affect Entity Framework performance?
- LINQ Query to Convert string to datetime
- Entity Framework select one of each group by date