Example #1
0
        public async Task <PenaltyDTO> Update(PenaltyDTO dto)
        {
            var result = await this.Handler.Execute(_log, async() =>
            {
                Penalty penalty = _penaltyFactory.CreateDomainObject(dto);
                penalty.Validate();

                penalty = await _penaltyRepository.Update(penalty);
                return(_penaltyMapper.ToDto(penalty));
            });

            return(result);
        }