Ejemplo n.º 1
0
        public ActionResult Index()
        {
            ViewBag.ModelIsNotValid = TempData["ModelIsNotValid"];
            var drinks = _repository.GetAll().ToList();

            return(View("Index", drinks));
        }
        public IActionResult GetAll()
        {
            var drinks    = _drinkRepository.GetAll();
            var drinkDtos = _mapper.Map <IList <DrinkDto> >(drinks);

            return(Ok(drinkDtos));
        }
Ejemplo n.º 3
0
 public IEnumerable <Drink> GetAll()
 {
     return(_repository.GetAll());
 }
Ejemplo n.º 4
0
 public List <Drink> GetAll()
 {
     return(_drinkRepository.GetAll());
 }
        public IActionResult SelectAllDrinks()
        {
            var drinks = _drinkRepository.GetAll();

            return(View(drinks));
        }
Ejemplo n.º 6
0
        public List <Drink> GetAllDrinks()
        {
            var result = _drinkRepository.GetAll().ToList();

            return(result);
        }
Ejemplo n.º 7
0
        public IActionResult BuyDrink()
        {
            var drinks = _drinkRepository.GetAll();

            return(View(drinks));
        }
Ejemplo n.º 8
0
 public IActionResult GetAll()
 {
     return(Ok(_drinkRepository.GetAll()));
 }