Esempio n. 1
0
        public async Task <IActionResult> Delete(int id)
        {
            var ingrediente = await _repository.GetById(id);

            if (ingrediente == null)
            {
                return(NotFound());
            }
            await _repository.Delete(id);

            return(NoContent());
        }
        public async Task <ActionResult <Ingredientes> > Delete(int id)
        {
            var list = await _repository.getById(id);

            if (list == null)
            {
                return(NotFound());
            }
            await _repository.Delete(id);

            return(NoContent());
        }
        public async Task <IActionResult> Deleteconfirm(int id)
        {
            await _Repository.Delete(id);

            return(RedirectToAction(nameof(Index)));
        }