/// <summary> /// Creates a new Booking /// </summary> /// <param name="userId">The Id of the user that creates the booking</param> /// <param name="facilityId">The Id of the facility that the booking is for</param> /// <param name="startTime">The Datetime that the booking starts</param> /// <param name="endTime">The Datetime that the booking ends</param> /// <returns>Returns an Interface of the newly created Booking</returns> public IBooking CreateBooking(string userId, int facilityId, DateTime startTime, DateTime endTime) { var bm = _personRegister.FetchBuildingManager(userId); var booking = _buildingRegister.CreateBooking((int)bm.BuildingId, facilityId, bm.Id, startTime, endTime); return(booking); }