// GET: Leagues/Details/5 public IActionResult Details(int?id) { if (id == null) { return(NotFound()); } var league = LeagueManager.GetLeague(id.Value); if (league == null) { return(NotFound()); } return(View(league)); }
public IActionResult Create(IFormCollection data) { LeagueManager.CreateTeam(data["TeamName"], LeagueManager.GetLeague(int.Parse(data["LeagueId"]))); return(RedirectToAction(nameof(Index))); }