There is an entity type called Product that is generated by entity framework. I have written this query
Product
public IQueryable GetProdu
you can add AsEnumerable to your collection like the follow :
public IQueryable GetProducts(int categoryID) { return from p in db.Products.AsEnumerable() where p.CategoryID== categoryID select new Product { Name = p.Name}; }