public IQueryable <SanPhamViewModel> GetPaginatedListSanPham(string Id) { var sanphams = _sanPhamRepository.GetAll(); if (Id != "LSP0006") { sanphams = _sanPhamRepository.GetAll().Where(x => x.LoaiSp == Id); } else { sanphams = _sanPhamRepository.GetAll().Where(x => x.LoaiSp != "LSP0002" && x.LoaiSp != "LSP0007" && x.LoaiSp != "LSP0008"); } var sanPhamResult = sanphams.ToList(); var result = _mapper.Map(sanPhamResult, new List <SanPhamViewModel>()); var returnResult = result.AsQueryable <SanPhamViewModel>(); return(returnResult); }
public IEnumerable <SanPham> GetAll() { return(_sanPhamRepository.GetAll(new string[] {})); }
public IEnumerable <SAN_PHAM> GetAll() { return(_sanPhamRepository.GetAll(new string[] { "THUONG_HIEU" })); }
public IEnumerable <SanPham> LayTatCa() { return(_sanPhamRepository.GetAll()); }