예제 #1
0
        public override void Import(string path)
        {
            var languageId = CultureInfo(EanLanguageCode(System.IO.Path.GetFileName(path))).LCID;


            LoadData(path);

            ImportLocalizedAccommodations(EanDataTransferObjects, FactoryOfRepositories.Localized <LocalizedAccommodation>(),
                                          FactoryOfRepositories.MappedEntities <Accommodation>().EanIdsToIds, languageId, CreatorId);

            EanDataTransferObjects = null;
        }
예제 #2
0
        public override void Import(string path)
        {
            LoadData(path);

            var typesOfAccommodationsEanIdsToIds = ImportTypesOfAccommodations(EanIdsToNames.Keys,
                                                                               FactoryOfRepositories.MappedEntities <TypeOfAccommodation>(), CreatorId);

            ImportLocalizedTypesOfAccommodations(EanIdsToNames,
                                                 FactoryOfRepositories.Localized <LocalizedTypeOfAccommodation>(), typesOfAccommodationsEanIdsToIds, DefaultLanguageId,
                                                 CreatorId);

            EanIdsToNames = null;
        }
예제 #3
0
        public override void Import(string path)
        {
            LoadData(path);

            if (Chains.Count <= 0)
            {
                return;
            }

            LogSave <Chain>();
            FactoryOfRepositories.MappedEntities <Chain>().BulkSave(Chains);
            LogSaved <Chain>();

            Chains = null;
        }