private void ImportCountries(Country[] eanCountries, IAdditionalRegionsInfoRepository <Data.Entity.Country> repository, IReadOnlyDictionary <long, int> regionsEanIdsToIds ) { LogBuild <Data.Entity.Country>(); var countries = BuildCountries(eanCountries, regionsEanIdsToIds, CreatorId); var count = countries.Length; LogBuilded(count); if (count <= 0) { return; } LogSave <Data.Entity.Country>(); repository.BulkSave(countries); LogSaved <Data.Entity.Country>(); }
private void ImportAirports( IEnumerable <AirportCoordinates> airportsCoordinates, IAdditionalRegionsInfoRepository <Airport> repository, IReadOnlyDictionary <long, int> eanIdsToIds, int creatorId ) { LogBuild <Airport>(); var airports = BuildAirports(airportsCoordinates, eanIdsToIds, creatorId); var count = airports.Length; LogBuilded(count); if (count <= 0) { return; } LogSave <Airport>(); repository.BulkSave(airports, count); LogSaved <Airport>(); }