public IEnumerable <string> Get() { traefikDAL dal = new traefikDAL(); var a = dal.ProcessRepositories().Result; return(a.ToList()); }
void updateIps() { traefikDAL traefikDal = new traefikDAL(); ClodflareDAL clodflareDal = new ClodflareDAL(); string publicip = clodflareDal.GetIP(); var a = traefikDal.ProcessRepositories().Result; var b = clodflareDal.getDnsList(); Dictionary <string, string> updateList = new Dictionary <string, string>(); List <string> createList = new List <string>(); foreach (var item in a) { if (b.ContainsKey(item)) { if (b[item].IPAddr != publicip) { updateList.Add(item, b[item].ID); } } else { createList.Add(item); } } clodflareDal.updateARecordes(updateList); clodflareDal.createNewARecordes(createList); }