public async Task <GameSkaterStatisticDTO> Update(GameSkaterStatisticDTO dto) { var result = await this.Handler.Execute(_log, async() => { GameSkaterStatistic gameSkaterStatistic = _gameSkaterStatisticFactory.CreateDomainObject(dto); gameSkaterStatistic.Validate(); gameSkaterStatistic = await _gameSkaterStatisticRepository.Update(gameSkaterStatistic); return(_gameSkaterStatisticMapper.ToDto(gameSkaterStatistic)); }); return(result); }
public GameSkaterStatisticDTO ToDto(GameSkaterStatistic domain) { return(new GameSkaterStatisticDTO() { Id = domain.Id, GameId = domain.GameId, PlayerId = domain.PlayerId, TeamId = domain.TeamId, ScoreType = domain.ScoreType, PrimaryAssistPlayerId = domain.PrimaryAssistPlayerId, SecondaryAssistPlayerId = domain.SecondaryAssistPlayerId, Period = domain.Period, Time = domain.Time, CreatedOnUtc = domain.CreatedOn }); }