I have the following model:
public class A
{
public int? Id {get;set;}
public DateTime Start {get;set;}
public DateTime End {get;set;}
}
Now I want to group all the entries by date, and sort them per date descending, and sorting per time ascending (using LINQ). Example output:
Jan 3. 2012
-- 10:00-11:00
-- 11:00-13:00
Jan 2. 2012
-- 10:00-11:00
-- 12:00-15:00
Jan 1. 2012
-- 9:00-10:00
-- 12:00-13:00
Is it possible to achieve this in LINQ-to-SQL or do I have to this after the query has executed (on the result list)?
You mean like this?