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