Is there a way in Linq to Sql (.net 3.5) to specify that when you get the children of a particular record, to force the list of children to come back in a specific order?
For example, I have a list that has a "DisplayOrder" on it. When I ask my parent record/object for it's property that returns to me this list, I want Linq to Sql to retrieve for me the records, but ordered by "DisplayOrder".
Is it possible to do this without always writing something like:
MyObject.Children.OrderBy(c => c.DisplayOrder);
An idea off the top of my head is to create a partial class for my object and add an "OrderedChildren" property that encapsulates this call. Wondering though, if there isn't something I can specify in the dbml to force this.