Пример #1
0
 private void AddPriz(priz prizInMemory)
 {
     using (var unitOfWork = _unitOfWorkFactory.Create())
     {
         _prizCommand.Insert(prizInMemory);
         unitOfWork.Commit();
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
        public void Add(RecruitInfo recruitInfo)
        {
            if (recruitInfo == null)
            {
                throw new ArgumentNullException(nameof(recruitInfo));
            }

            var priz = RecruitInfoMapper.Map(recruitInfo);

            _prizCommand.Insert(priz);
        }
Пример #4
0
        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);
        }