I get this error:
Cannot implicitly convert type 'System.Collections.GenericList' to System.Collections.Generic.List'
I get this error:
Cannot implicitly convert type 'System.Collections.GenericList' to System.Collections.Generic.List'
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Dec 21, 2021, 5:25 PM
geetha geethaPosted Dec 22, 2021, 5:17 AM
There is a problem in Namespace, you can change your namspace to
After setting the namespace you have the same issue you need use IEnumerable .
You have to create a temporay class with your properties as in select statement and return
IEnumerableof that class.Then modify your function to return
IEnumerable.Jignesh KumarPosted Dec 21, 2021, 11:59 AM
Hi Dinesh,
You are trying to map your model property or model which is not same. If still not clear please share models and code where you are getting error. or after your query you missed YourLinqQuery.ToList()