Hi,
I have a few tables, Listings, ListingImages and a few others related to Listings. ListingImages is related to Listings so that you can have many ListingImages per Listing.
When I query this table I do;
IQueryable<Listing> ListingToSendToView = (from x in DBEntities.ListingSet.Include("ListingImages")
.Include("OtherTables")
where x.Listing.ID == (int)LID
orderby x.ID descending
select x).First();
Now this is fine. However, I now want to sort the ListingImages independently within each Listing (by an ImageOrder column I have in that table).
How can I do this and pass all my Includes(...). Would it be bad form to sort the ListingImages within the View as this solution seems to work?
Cheers