예제 #1
0
        public async Task <IActionResult> Delete(Guid?id)
        {
            var retorno = false;

            try { retorno = await _tarefaService.DeletarItem(id); }
            catch { return(NotFound()); }

            if (!retorno)
            {
                return(NotFound());
            }

            return(RedirectToAction("Index"));
        }
예제 #2
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            await _tarefaItemService.DeletarItem(id);

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