public int Load(IEnumerable <PsmartSource> sources, bool clearFirst = true) { if (clearFirst) { _psmartStageRepository.Clear(_emr); } var stages = _mapper.Map <IEnumerable <PsmartSource>, IEnumerable <PsmartStage> >(sources); _psmartStageRepository.Load(stages); _psmartStageRepository.SaveChanges(); return(_psmartStageRepository.Count(_emr)); }
public void should_Clear() { _psmartStageRepository.Clear("iqcare"); Assert.False(_context.Set<PsmartStage>().Any()); }