I have the below LINQ, and I need the result returned as a List but I receive the error:
Cannot implicitly convert type
System.Collections.Generic.IEnumerable<<anonymous type: string emis>>toSystem.Collections.Generic.List<string>. An explicit conversion exists (are you missing a cast?)
How can I return a List of strings?
List<string> emisList = (
from p in subproductTypeyProduct
join q in dbEntitiesParams.PARAM_Rule
on new { p.ProductType, p.SubProductTypeCode }
equals new { ProductType = q.ProductTypeCode, SubProductTypeCode = q.SubProductCode }
select new { q.emis });