コード例 #1
0
        public LeagueListViewComponent(GambleDbContext gambleDbContext)
        {
            _gambleDbContext = gambleDbContext;
            var leagues = _gambleDbContext.Leagues.OrderBy(l => l.Name).ToList();

            Leagues = new List <NavigationLinkVM>();

            foreach (var league in leagues)
            {
                Leagues.Add(new NavigationLinkVM {
                    Text = league.Name, Controller = "Home", Action = "FindByLeague", RouteId = league.Id
                });
            }
        }
コード例 #2
0
 public GameController(GambleDbContext gambleDbContext)
 {
     _gambleDbContext = gambleDbContext;
 }
 public LeagueListViewComponent(GambleDbContext gambleDbContext)
 {
     _gambleDbContext = gambleDbContext;
 }