Ejemplo n.º 1
0
 public ActionResult <IEnumerable <Car> > GetAll()
 {
     try
     {
         return(Ok(_cs.GetAll()));
     }
     catch (System.Exception)
     {
         throw;
     }
 }
Ejemplo n.º 2
0
 public ActionResult <IEnumerable <Car> > GetAll()
 {
     try
     {
         return(Ok(_cs.GetAll()));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }