Beispiel #1
0
        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));
        }
Beispiel #2
0
 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());
 }