public void Update(River river, String name, Double lenght, List <Country> countries) { try { var tempList = countries.Select(s => s.ID).ToList(); List <Country> countryList = uow.countryRepo.getAll().FindAll(s => tempList.Contains(s.ID)); river.SetLenght(lenght); river.SetName(name); river.SetCountries(countryList); uow.Complete(); } catch (Exception e) { throw new Exception("RiverManager Update " + e.Message); } }