Example #1
0
        public ActionResult Create([FromBody] BookingViewModel vm)
        {
            var rt  = vm.ToBooking();
            var res = _bo.Create(rt);

            return(res.Success ? Ok() : InternalServerError());
        }
        public ActionResult Create([FromBody] BookingViewModel vm)
        {
            var b   = vm.ToBooking();
            var res = _bo.Create(b);

            return(StatusCode(res.Success ? (int)HttpStatusCode.OK : (int)HttpStatusCode.InternalServerError));
        }