Error 1 'System.Linq.IGrouping<int,AnonymousType#1>' does not contain a definition for 'rental_rc' and no extension method 'rental_rc' accepting a first argument of type 'System.Linq.IGrouping<int,AnonymousType#1>'
could be found (are you missing a using directive or an assembly reference?) C:\Users\.....
micnie2020
Member
308 Points
537 Posts
Re: DataSet .Select and .GroupBy
Apr 26, 2012 10:44 AM|LINK
Thank you for your kind reply.
I manage to done untill here:-
dataSet1.TotalRevenueByMonth.Select(k =>new { k.totalcategory, k.rental_rc }).GroupBy(p => p.totalcategory).Sum(p => p.rental_rc).Where(p => p.totalcategory.Equals(Helpers.TotalCategory.PNEWBUSINESS)).FirstOrDefault();
But got error:-
Error 1 'System.Linq.IGrouping<int,AnonymousType#1>' does not contain a definition for 'rental_rc' and no extension method 'rental_rc' accepting a first argument of type 'System.Linq.IGrouping<int,AnonymousType#1>' could be found (are you missing a using directive or an assembly reference?) C:\Users\.....
Please advise