public IHttpActionResult GetNegocio(int id) { try { Negocio result = NegocioBLL.Get(id); if (result == null) { return(NotFound()); } return(Content(HttpStatusCode.OK, result)); } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }
public IHttpActionResult DeleteNegocio(int id) { Negocio negocio = NegocioBLL.Get(id); if (negocio == null) { return(NotFound()); } try { NegocioBLL.Delete(id); return(Ok("Negocio eliminado correctamente")); } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }