예제 #1
0
        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));
        }
예제 #2
0
 public void should_Clear()
 {
     _psmartStageRepository.Clear("iqcare");
     Assert.False(_context.Set<PsmartStage>().Any());
 }