Suppose I have:
class Person
{
[ColumnAttribute(\"ID\"]
public int Id;
[ColumnAttribute(\"Name\"]
public string Name;
[ColumnAttribute(\"DateOfBirth\"]
p
Is there a specific reason to force ordering on the GetAllByAge()
method itself? Why not just sort it once you get it back? Does the order by logic need to happen server side? I would return a List
(which you mentioned doing yourself) and use LINQ to order the set as needed, unless I had a really good reason not to:
Dal.Person.GetAllByAge(25).OrderBy(p => p.BirthDate);