I am using ASP.net MVC with C#
Why this is code :
public IQueryable<Product> ListProducts(string prodcutType)
{
var results = from p in db.Products
join s in db.Stocks
on p.ID equals s.IDProduct
where p.ptype == prodcutType
select new { s.width, s.height, s.number};
return results;
}
is showing the following error?
Error 1 Cannot implicitly convert type
System.Linq.IQueryable<AnonymousType#1>
toSystem.Linq.IQueryable<eim.Models.Product>
. An explicit conversion exists (are you missing a cast?)