Hi Pål,
you are right, there is an exception. However, the reason is because the type of the Orders property is IEnumerable<Order>. And IEnumerable<Order> does not have itself a Count() method, but one is provided as extension method from Enumerable.Count().
If you use ICollection<Order> type as property type for the Orders property, then the correct query is executed.
Greetings,
Thomas
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.