how to GroupBy according to month in a LINQ query
I made this LINQ query
DataEntities db = new DataEntities();
var records = db.Table_1.GroupBy(x => x.date).tolist();
where Table_1 columns of are of type
ColumnName dataType
id numeric
date datetime
records in table_1 id date 1 3/May/2013 2 4/Apr/2013 3 7/May/2013
i want to groupby all records of Table_1 according to Months like
var records = db.Table_1.GroupBy(x => x.date.Month).tolist();
is there any way to do this
No comments:
Post a Comment