public IActionResult Delete(int id) { try { var result = UsuarioBusiness.Delete(id); if (result == true) { return(NoContent()); } else { return(BadRequest()); } } catch (Exception msg) { return(BadRequest("ERROR IN PROCESS THE REQUEST" + msg.Message)); } }
public ActionResult <Usuario> DeleteUsuario(Guid id) { var usuarioExiste = UsuarioExists(id); if (!usuarioExiste) { return(NotFound()); } try { _usuarioBusiness.Delete(id); _unitOfWork.Commit(); return(Ok(id)); } catch (Exception ex) { _unitOfWork.Rollback(); return(Conflict(ex.Message)); } }
public IActionResult Delete(long id) { _usuarioBusiness.Delete(id); return(NoContent()); }