// POST: api/Booking public IHttpActionResult Post([FromBody] BookingModel booking) { if (roomHandler.isAvailable(booking.RoomId)) { bookingHandler.Create(booking, booking.UserId); return(Ok()); } else { return(Ok("Couldn't be booked")); } }