public IEnumerable <Product> FindProductByKeyword(string keyword) { var AllProductswithSearchKey = context.Set <Product>(). Where(x => x.Name.ToLower().Contains(keyword) || x.Category.ToLower().Contains(keyword) || x.Color.ToLower().Contains(keyword) || x.prodCode.ToLower().Contains(keyword)).Select(x => x); return(AllProductswithSearchKey); }
public IEnumerable <Expenses> GetShopExpenses(int id) { return(dbcontext.Set <Expenses>().Where(x => x.shopId == id).Select(x => x)); }
public int GetNoItemsUnavailable() { return(context.Set <Product>().Where(x => x.quantityAvailable < 1).Count()); }
public IEnumerable <ShoppingCart> GetAllCarts() { return(dbContext.Set <ShoppingCart>()); }
public int Count() { return(dbcontext.Set <TEntity>().Count()); }