I it was possible to do this in Active Record, but is this feasible with Linq to SQL?
You can always add a property to the data-context / entities objects in a partial class file:
partial class MyDataContext {
public IOrderedQueryable<Foo> FoosByName {
get {return Foos.OrderBy(foo=>foo.Name);}
}
}
Then any queries started from FoosByName
will be pre-ordered (but still composable).