public static bool EqualsWithoutId(Bank first, Bank second) { return(first.Bik == second.Bik && first.City == second.City && (first.DefaultCorAccount != null && first.DefaultCorAccount.CorAccountNumber == second.DefaultCorAccount.CorAccountNumber) && first.CorAccounts.All(x => second.CorAccounts.Any(y => y.CorAccountNumber == x.CorAccountNumber)) && first.Name == second.Name && BankRegion.EqualsWithoutId(first.Region, second.Region) && first.Deleted == second.Deleted); }
private void UpdateRegions(IUnitOfWork uow) { OutputMessage("Обновление регионов"); var UpdatedObject = new List <object>(); int index = 0; Progress(0, 1); foreach (var reg in regions.Items) { var foundedRegion = regionsList.FirstOrDefault(x => x.RegionNum == (int)reg.RegCode); if (foundedRegion == null) { foundedRegion = new BankRegion { RegionNum = (int)reg.RegCode }; } foundedRegion.Region = reg.CNAME; uow.Save(foundedRegion); Progress(index, regions.Items.Count()); index++; } }
public static bool EqualsWithoutId(BankRegion first, BankRegion second) { return(first.City == second.City && first.Region == second.Region && first.RegionNum == second.RegionNum); }
public static bool EqualsWithoutId(BankRegion first, BankRegion second) { return (first.City == second.City && first.Region == second.Region && first.RegionNum == second.RegionNum); }