There is an entity type called Product that is generated by entity framework. I have written this query
Product
public IQueryable GetProdu
You can use this and it should be working --> You must use toList before making the new list using select:
toList
db.Products .where(x=>x.CategoryID == categoryID).ToList() .select(x=>new Product { Name = p.Name}).ToList();