Sort Relationships in Entity Framework


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var lateCustomers = from c in ctx.Customers
  2. where c.IsMoreThan30DaysInArrears
  3. select new {
  4. Customer = c,
  5. Orders = c.Orders.OrderByDescending(
  6. o => o.OrderDate
  7. )
  8. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.