public virtual int Patch(Country country) { var countryToUpdate = _countriesRepository.Get(new object[] { country.Id }); if (!string.IsNullOrEmpty(country.IsoCode)) { countryToUpdate.IsoCode = country.IsoCode; } if (!string.IsNullOrEmpty(country.Name)) { countryToUpdate.Name = country.Name; } _countriesRepository.Update(countryToUpdate); return(_countriesRepository.Complete()); }