public ActionResult <Trip> Create([FromBody] Trip newTrip)
 {
     try
     {
         return(Ok(_tripsService.Create(newTrip)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
 public ActionResult <Trip> Create([FromBody] Trip newTrip)
 {
     try
     {
         return(Ok(_TS.Create(newTrip)));
     }
     catch (Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Ejemplo n.º 3
0
 public ActionResult <Trip> Create([FromBody] Trip newTrip)
 {
     try
     {
         Trip created = _tservice.Create(newTrip);
         return(Ok(created));
     }
     catch (System.Exception e)
     {
         return(BadRequest(e.Message));
     }
 }