Beispiel #1
0
 public ActionResult <IEnumerable <Vacation> > GetAll()
 {
     try
     {
         var data = _service.getAll();
         return(Ok(data));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Beispiel #2
0
 public ActionResult <IEnumerable <IInfo> > GetAllPurchasables()
 {
     try
     {
         return(Ok(_vacationService.getAll()));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }