0

I am using Dynamic Linq to sort my database based on a string. However it throws an error saying:

The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

The reason for this is because I am doing an order by like this: q => OrderBy("Purchase.Date", false)), so it should generate something like OrderBy(x => x.Purchase.Date), while in reality it just says OrderBy(x => x.Date)

Is there a better way to do this?

Chris Pickford
  • 8,642
  • 5
  • 42
  • 73
user2657943
  • 2,598
  • 5
  • 27
  • 49

0 Answers0