public static void MapToEntity(this BookingTimeOverrideRuleModel model, BookingTimeOverrideRuleConfiguration rule)
        {
            if (model.Id.HasValue)
            {
                rule.Id = model.Id.Value;
            }

            rule.EventId = model.EventId.Value;
            rule.OverrideBookingTimes = model.BookingTimes.Select(t => TimeSpan.Parse(t)).ToList();
        }
 public static void MapFromEntity(this BookingTimeOverrideRuleModel model, BookingTimeOverrideRuleConfiguration rule)
 {
     model.Id           = rule.Id;
     model.BookingTimes = rule.OverrideBookingTimes.Select(t => t.ToString("hh\\:mm")).ToList();
     model.EventId      = rule.EventId;
 }