Ejemplo n.º 1
0
        public override void Handle(IBulkLengthFactorCreated command)
        {
            var salesAreaNames = command.Data.Select(x => x.SalesArea).Distinct().ToList();

            _salesAreaRepository.ValidateSalesArea(salesAreaNames);

            var lengthFactors = _mapper.Map <List <GamePlan.Domain.LengthFactors.LengthFactor> >(command.Data);

            _repository.AddRange(lengthFactors);
            _repository.SaveChanges();
        }
 public override void Handle(IBulkLengthFactorDeleted command)
 {
     _repository.Truncate();
     _repository.SaveChanges();
 }