예제 #1
0
        public ImportResult Import(ImportParams importParams)
        {
            var reader = GetNopCommerceDataReaders().FirstOrDefault(x => x.GetType().FullName == importParams.ImporterType);

            if (reader== null)
                return new ImportResult { Messages = new List<string> { "Could not find the requested importer" } };

            reader.SetConnectionString(importParams.ConnectionString);
            reader.SetPictureInfo(importParams.PictureInfo);
            return _performNopImport.Execute(reader);
        }
        public ImportResult Import(ImportParams importParams)
        {
            var reader = GetNopCommerceDataReaders().FirstOrDefault(x => x.GetType().FullName == importParams.ImporterType);

            if (reader == null)
            {
                return new ImportResult {
                           Messages = new List <string> {
                               "Could not find the requested importer"
                           }
                }
            }
            ;

            reader.SetConnectionString(importParams.ConnectionString);
            reader.SetPictureInfo(importParams.PictureInfo);
            return(_performNopImport.Execute(reader));
        }