Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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
     });
 }