public IEnumerable <Product> SanPhamCungTheLoai(string searchString, long catelogID) { ShopXeDapDbContext db = new ShopXeDapDbContext(); IQueryable <Product> dsProduct = db.Products; if (!string.IsNullOrEmpty(searchString)) { dsProduct = dsProduct.Where(x => x.Name.Contains(searchString) || x.Code.Contains(searchString)); } return(dsProduct.Where(x => x.CategoryID == catelogID).ToList()); }
public FeedbackDao() { db = new ShopXeDapDbContext(); }
public ProductCategoryDao() { db = new ShopXeDapDbContext(); }
public ProductDao() { db = new ShopXeDapDbContext(); }
public OrderDao() { db = new ShopXeDapDbContext(); }
public UserGroupDao() { db = new ShopXeDapDbContext(); }
public SlideDao() { db = new ShopXeDapDbContext(); }
public FooterDao() { db = new ShopXeDapDbContext(); }
public MenuDao() { db = new ShopXeDapDbContext(); }
public ContactDao() { db = new ShopXeDapDbContext(); }