Example #1
0
        // GET: Stat/Games
        public async Task <IActionResult> Index()
        {
            IIncludableQueryable <Game, IdentityUser> applicationDbContext = _context.Games.Include(g => g.User1).Include(g => g.User2);

            var sql = applicationDbContext.ToString();

            String temp = applicationDbContext.ToSql();


            List <Game> games = await applicationDbContext.ToListAsync();



            //games.ForEach(x =>
            //{
            //    GameModel gm = (GameModel)x;
            //    gm.User1Email = "em1";
            //    gm.User2Email = "em2";
            //    models.Add(gm);
            //});


            return(View(games));
        }