// GET: Pizza/Details/5
        public async Task <ActionResult> Details(Guid id)
        {
            var pizza = await _pizzaRepo.GetPizzaAsync(id);

            PizzaVM vm = new PizzaVM(_pizzaRepo, _toppingRepo, _sizeRepo, pizza);

            return(View(vm));
        }
Exemple #2
0
        public async Task <ActionResult <PizzaDTO> > GetPizzaAsync(Guid id)
        {
            //return await _pizzaRepo.GetPizzaAsync(id);

            _logger.LogInformation($"api/pizza/{id} - USED");

            var pizza = await _pizzaRepo.GetPizzaAsync(id);

            var pizzadto = _mapper.Map <PizzaDTO>(pizza);

            return(pizzadto);
        }