public async Task <ActionResult <PlayerDto> > GetPlayer([FromRoute] Guid playerId) { var query = new GetPlayerQuery() { PlayerId = playerId }; var result = await _queryDispatcher.QueryAsync <PlayerDto>(query); if (result == null) { return(NotFound()); } return(Ok(result)); }
public Task <CreatureReadModel> Get(GetPlayerQuery query, CancellationToken cancellationToken) { return(_mediator.Send(query ?? new GetPlayerQuery(), cancellationToken)); }