Exemplo n.º 1
0
    public async Task <IActionResult> GetTournament([FromRoute] Guid tournamentId)
    {
        try
        {
            var projection = await _tournamentQueryHandler.GetTournamentAsync(tournamentId);

            return(Ok(TournamentResponse.From(projection)));
        }
        catch
        {
            return(NotFound());
        }
    }
Exemplo n.º 2
0
    public async Task <IActionResult> GetTournaments()
    {
        var projection = await _tournamentQueryHandler.GetTournamentsAsync();

        return(Ok(TournamentResponse.From(projection)));
    }