Esempio n. 1
0
        public async Task <IActionResult> Deleteconfirm(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            await _repository.Delete(id.Value);

            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public async Task <IActionResult> Delete(int id)
        {
            var Plato = await _repository.GetById(id);

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

            return(NoContent());
        }