So, I have this LINQ query:
var Result = from u in Users 
             group u by new {u.AccountType, u.Id,u.CreationDate} into usergroup
             select new {id=usergroup.Key.Id,CreationDate=usergroup.Key.CreationDate,AccountType=usergroup.Key.AccountType};
that returns the following data set:
I am able to get the individual group count like this:
var myresult=Result.GroupBy(n=>n.AccountType).Select(n=>new {AccountType=n.Key,TotalCount=n.Count()});
which gives me:
Now suppose, I define a custom date range of Months from January-December, how can I do a group on the first data-set to give me count of AccountType based on each month based on the CreationDate column into my custom date range?


 
     
     
     
     
     
    