Пример #1
0
 [HttpGet]  // GETALL
 public ActionResult <IEnumerable <Rental> > GetAll()
 {
     try
     {
         return(Ok(_service.GetAll()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }