Esempio n. 1
0
 public IHttpActionResult Get()
 {
     try
     {
         List <Servicio> todos = ServicioBLL.List();
         return(Content(HttpStatusCode.OK, todos));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.BadRequest, ex));
     }
 }
Esempio n. 2
0
 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));
     }
 }
Esempio n. 3
0
 // GET: Servicios
 public ActionResult Index()
 {
     return(View(ServicioBLL.List()));
 }