There is an entity type called Product that is generated by entity framework. I have written this query
Product
public IQueryable GetProdu
Another simple way :)
public IQueryable GetProducts(int categoryID) { var productList = db.Products .Where(p => p.CategoryID == categoryID) .Select(item => new Product { Name = item.Name }) .ToList() .AsQueryable(); // actually it's not useful after "ToList()" :D return productList; }