Esempio 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);
    }
Esempio n. 2
0
    public async Task <Contracts.FoosballGame> HandleAsync(GetFoosballGame query)
    {
        var result = await _foosballGamesRepository.Get(query.Id);

        return(result.ToContract());
    }