public string Post([FromBody] Booking value) { BookingPersistence bp = new BookingPersistence(); //int id; //id = cp.saveClient(value); //value.ID = id; string bookingReg = bp.saveBooking(value); //HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created); //response.Headers.Location = new Uri(Request.RequestUri, string.Format("client")); return(bookingReg); }
public BookingController(HttpListenerContext context) : base(context) { _schedulePersistence = new SchedulePersistence(); _userPersistence = new UserPersistence(); _bookingPersistence = new BookingPersistence(); }