Ejemplo n.º 1
0
 public void InitTest()
 {
     _firstContext = new FakeContext();
     _secondContext = new FakeContext();
     _firstDb = new DbInteropService(_firstContext);
     _secondDb = new DbInteropService(_secondContext);
     _firstImport = new DbImportService(_firstContext);
     _secondImport = new DbImportService(_secondContext);
     _firstSettings = new SettingsService(_firstDb);
     _secondSettings = new SettingsService(_secondDb);
 }
Ejemplo n.º 2
0
 public ExportService(IDbInteropService dbInteropService, IMaterialManager materialManager , IDbImportService dbImportService, ISettingsService settingsService)
 {
     _dbInteropService = dbInteropService;
     _materialManager = materialManager;
     _dbImportService = dbImportService;
     _settingsService = settingsService;
     var config = new MapperConfiguration(cfg =>
     {
         cfg.CreateMap<Idea, IdeaDto>();
         cfg.CreateMap<Comment, CommentDto>();
         cfg.CreateMap<Particle, ParticleDto>();
         cfg.CreateMap<Relation, RelationDto>();
         cfg.CreateMap<Tag, TagDto>();
         cfg.CreateMap<Reference, ReferenceDto>();
         cfg.CreateMap<Setting, SettingDto>();
         cfg.CreateMap<Header, HeaderDto>();
     });
     _map = config.CreateMapper();
 }