public void SetResults(MatchupDto matchup) { Wins = matchup.Wins; Losses = matchup.Losses; Ties = matchup.Ties; DidWin = matchup.DidWin; DidTie = matchup.DidTie; }
public IActionResult ReportScore(int tournamentId, int matchupId, [FromBody] MatchupDto score) { if ((score.Player1Score == 0 && score.Player2Score == 0) || score.Player1Score < 0 || score.Player2Score < 0) { return(BadRequest()); } roundRepository.SetScore(matchupId, score.Player1Score, score.Player2Score); return(Ok()); }