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

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

            return(result);
        }