Ejemplo n.º 1
0
 [HttpPost] // POST
 public ActionResult <Cruise> Create([FromBody] Cruise newCruise)
 {
     try
     {
         return(Ok(_service.Create(newCruise)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Ejemplo n.º 2
0
 public ActionResult <Cruise> Create([FromBody] Cruise newCruise)
 {
     try
     {
         return(Ok(_cruisesService.Create(newCruise)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Ejemplo n.º 3
0
 public ActionResult <Cruise> Create([FromBody] Cruise newCruise)
 {
     try
     {
         Cruise created = _cservice.Create(newCruise);
         return(Ok(created));
     }
     catch (System.Exception e)
     {
         return(BadRequest(e.Message));
     }
 }