I have a table that looks roughly like this:
Date | Category | Name
01/02/2014 | A | Foo
01/02/2014 | B | Bar
02/02/2014 | A | Baz
02/02/2014 | A | Bla
I am trying to build a query that produces something like this:
Date | CategoryACount | CategoryBCount
01/02/2014 | 1 | 1
02/02/2014 | 2 | 0
I currently I have stored procedure that loops through the dates and create a temporary table by querying the data one by one, and we are planning to move all application logic out of stored procedure.
How do I produce this query in EF?