public void SetUp() { _context = new ExtractsContext(_options); _psmartStageRepository = new PsmartStageRepository(_context); var psmartStages = Builder<PsmartStage>.CreateListOfSize(2).All().With(x => x.Emr = "iqcare").Build().ToList(); _context.AddRange(psmartStages); _context.SaveChanges(); }
public ExtractSenderController(IPsmartSendService psmartSendService, IPsmartStageRepository psmartStageRepository, IExtractHistoryRepository extractHistoryRepository, IPsmartExtractService psmartExtractService) { _psmartSendService = psmartSendService; _psmartStageRepository = psmartStageRepository; _extractHistoryRepository = extractHistoryRepository; _psmartExtractService = psmartExtractService; }
public PsmartExtractService(IPsmartSourceReader psmartSourceReader, IPsmartStageRepository psmartStageRepository, IExtractHistoryRepository extractHistoryRepository) { _psmartSourceReader = psmartSourceReader; _psmartStageRepository = psmartStageRepository; _extractHistoryRepository = extractHistoryRepository; var config = new MapperConfiguration(cfg => { cfg.CreateMissingTypeMaps = false; cfg.AllowNullCollections = true; cfg.CreateMap <PsmartSource, PsmartStage>(); }); _mapper = new Mapper(config); }