public IHttpActionResult Delete(int id) { try { NegocioBLL.Delete(id); return(Ok("Negocio eliminado correctamente")); } 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)); } }