Example #1
0
 public void Load(ITimeZoneRepository timeZoneRepository, IDaylightSavingsAdjustmentRepository daylightSavingsAdjustmentRepository)
 {
     string[] supportedIanaIds = _tzMapper.GetAvailableTZIDs();
     foreach (DbTimeZone timeZone in timeZoneRepository.GetAll())
     {
         if (supportedIanaIds.Any(ianaId => ianaId == timeZone.IanaId))
         {
             TimeZoneInfo timeZoneInfo = _tzMapper.MapTZID(timeZone.IanaId);
             string       microsoftId  = timeZoneInfo.Id;
             timeZone.UpdateMicrosoftId(microsoftId);
             timeZoneRepository.Update(timeZone);
         }
     }
 }
 public IEnumerable <Entities.DbTimeZone> GetAllTimeZones()
 {
     return(_timeZoneRepository.GetAll());
 }