public async Task HandleAsync(AddPointForTeam command) { var game = await _foosballGamesRepository.Get(command.GameId); var newGame = game.AddPointForTeam(command.Team); await _foosballGamesRepository.Update(newGame); }
public async Task <Contracts.FoosballGame> HandleAsync(GetFoosballGame query) { var result = await _foosballGamesRepository.Get(query.Id); return(result.ToContract()); }