コード例 #1
0
 public ActionResult <IEnumerable <Car> > GetAll()
 {
     try
     {
         return(Ok(_cs.GetAll()));
     }
     catch (System.Exception)
     {
         throw;
     }
 }
コード例 #2
0
 public ActionResult <IEnumerable <Car> > GetAll()
 {
     try
     {
         return(Ok(_cs.GetAll()));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }