Exemplo n.º 1
0
        // 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));
        }
Exemplo n.º 2
0
 public IActionResult Create(IFormCollection data)
 {
     LeagueManager.CreateTeam(data["TeamName"], LeagueManager.GetLeague(int.Parse(data["LeagueId"])));
     return(RedirectToAction(nameof(Index)));
 }