Ejemplo n.º 1
0
        public async Task ExecuteAsync(GameRatingUpdatedCommand command)
        {
            _logger.LogInformation(
                $"{nameof(GameRatingUpdatedCommand)} has been triggered with parameter {command.ToJsonString()}");

            UpdateGameRatingCommand updateGameRating = _mapper.Map <UpdateGameRatingCommand>(command);

            await _mediator.Send(updateGameRating);
        }
 public async Task Handle(GameRatingUpdatedEvent @event)
 {
     UpdateGameRatingCommand command = new UpdateGameRatingCommand(@event.GameId, @event.CountOfReviews, @event.AverageRating);
     await _mediator.Send(command);
 }