public IHttpActionResult Post(BookingSeat bookingSeat) { var res = bookingRepository.ConfirmBooking(bookingSeat, Request.Properties["user"] as User); if (res == "invalid request") { return(StatusCode(HttpStatusCode.BadRequest)); } else if (res == "already booked") { return(StatusCode(HttpStatusCode.Conflict)); } else { return(Ok(bookingSeat)); } }