public ActionResult Filter(CoffeeSortBll sort, Guid countryId) { List <CoffeeView> coffee = coffeeService.Filter(sort, countryId).Select(CoffeeMapper.Map).ToList(); if (Request.IsAjaxRequest()) { return(PartialView("_Coffee", coffee)); } return(View("_Coffee", coffee)); }
public List <CoffeeBll> Filter(CoffeeSortBll sort, Guid countryId) { return(coffeeRepository.GetAll().Where(c => c.CoffeeSortId == (int)sort && c.Country.Id == countryId) .Select(CoffeeMapper.Map).ToList()); }