public async Task <Resultado> Delete(int id) { await _service.Delete(id); return(Notificador.HasNotification() ? Resultado.Failed(Notificador.GetNotifications().Select(x => x.Mensagem).ToArray()) : Resultado.Successfull()); }
public IActionResult Delete(int id) { return(Ok( _DepartamentoService.Delete(id) )); }
public IActionResult Delete(int id) { try { var entity = departamentoService.Find(id); if (entity == null) { return(NotFound()); } departamentoService.Delete(entity); return(Ok()); } catch (Exception) { throw; } }