Exemplo n.º 1
0
    public async Task HandleAsync(AddPointForTeam command)
    {
        var game = await _foosballGamesRepository.Get(command.GameId);

        var newGame = game.AddPointForTeam(command.Team);
        await _foosballGamesRepository.Update(newGame);
    }
Exemplo n.º 2
0
    public async Task <Contracts.FoosballGame> HandleAsync(GetFoosballGame query)
    {
        var result = await _foosballGamesRepository.Get(query.Id);

        return(result.ToContract());
    }