Thursday, 28 April 2011

LINQ Group By Query - Cannot implicitly convert System.Collections.Generic.List

LinQ query is throwing an error mentioned below while I query a RecordSet with Group By Category of my Orders. After two hours of fighting with this query I came to know how to solver this issue. Hope this could be help any one hanging with these kind of error.
Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Collections.Generic.List'
< AnonymousType#1 > to 'System.Collections.Generic.List < ESB.Exceptions.Service.Implementation.EMPTable >'

My method looks like below which is throwing an error

The Fix is very simple , Add Class before writing new list.

You can reach me @