Пример #1
0
        public async Task <IActionResult> DeleteConfirmed(Guid id)
        {
            var patrimonioViewModel = _mapper.Map <PatrimonioViewModel>(await _patrimonioRepository.ObterPorId(id));

            if (patrimonioViewModel == null)
            {
                return(NotFound());
            }

            await _patrimonioRepository.Remover(id);

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