private void AddPriz(priz prizInMemory) { using (var unitOfWork = _unitOfWorkFactory.Create()) { _prizCommand.Insert(prizInMemory); unitOfWork.Commit(); } }
public void CreatePrizeRangeFirebirdTest() { var priz1 = FirebirdData.Build(1); var priz2 = FirebirdData.Build(2); using (var unitOfWork = _unitOfWorkFactory.Create()) { _prizCommand.Insert(new List <PRIZ>() { priz1, priz2 }); unitOfWork.Commit(); } var expectedCount = 2; var actualCount = _prizQuery.GetAll().Count(); Assert.AreEqual(expectedCount, actualCount); }
public void Add(RecruitInfo recruitInfo) { if (recruitInfo == null) { throw new ArgumentNullException(nameof(recruitInfo)); } var priz = RecruitInfoMapper.Map(recruitInfo); _prizCommand.Insert(priz); }
public void Move(IEnumerable <RecruitInfo> recruitInfoes) { if (recruitInfoes == null) { throw new ArgumentNullException(nameof(recruitInfoes)); } var prizRange = recruitInfoes.Select(r => RecruitInfoMapper.Map(r)).ToList(); _prizCommand.Insert(prizRange); UpdateIds(recruitInfoes, prizRange); }