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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted Dec 21, 2021, 12:25 PM EST
Jignesh KumarRank #91 · 22.9K reputationPosted Dec 21, 2021, 6:59 AM EST
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()
geetha geethaRank #7,130 · 248 reputationPosted Dec 22, 2021, 12:17 AM EST
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.