Posts Tagged ‘entity framework’

Think: In the Entity Framework…
you have two models like this:
Item{ID, Name, Category}, Category{ID, Name}
With a Relationship like this:
Item belongs to a Category. and a Category may have zero or more Items.
if you try to sort the Items by their Category(which doesn’t make sense in the first place! ) by doing something like:
YourObjectContext.Items.OrderBy(“it.Category”)
you would get [...]