public IHttpActionResult Get() { try { List <Servicio> todos = ServicioBLL.List(); return(Content(HttpStatusCode.OK, todos)); } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }
public IHttpActionResult GetByBussiness(int id) { try { List <Servicio> result = ServicioBLL.List(id); if (result == null) { return(NotFound()); } return(Content(HttpStatusCode.OK, result)); } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }
// GET: Servicios public ActionResult Index() { return(View(ServicioBLL.List())); }