예제 #1
0
        public async Task <IActionResult> DeleteConfirmed(Guid id)
        {
            try
            {
                var plano = await ObterPlano(id);

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

                await _planoRepository.Remover(_mapper.Map <Plano>(plano));
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }

            return(RedirectToAction("Index"));
        }