I have created a simplified scenario below of my problem. I need to set EmptyBookingAllowed to true or false, however AllowEmptyBooking will not exist in the config for certain customers.
How do I set EmptyBookingAllowed to true if the config.AllowEmptyBooking otherwise set it to the value of config.AllowEmptyBooking.
public Class BookingSession()
{
public string Username {get; set;}
public bool EmptyBookingAllowed {get; set;}
}
BookingSession session = new BookingSession(){
Username = "whatever",
EmptyBookingAllowed = config.AllowEmptyBookings
};