public Game Edit(Game editGame) { Game game = _repo.Get(editGame.Id); if (game == null) { throw new Exception("Invalid Id"); } game.AwayTeamId = editGame.AwayTeamId; game.HomeTeamId = editGame.HomeTeamId; game.WinnerId = editGame.WinnerId; _repo.Edit(game); return(game); }