/* * * * Game logic * * */ public async Task <bool> GameExists(CreateGameDto createGameDto) { var games = await _repo.GetGames(); foreach (Game game in games) { if (game.GameDate == createGameDto.GameDate && game.HomeTeamID == createGameDto.HomeTeamID && game.AwayTeamID == createGameDto.AwayTeamID) { return(true); } } return(false); }