// This handles the index logic private dynamic index() { // Initialize the model var models = _context.PopulateAuctionAllOrderByRemaining(); // Check to make sure user is logged in var result = user_check(model: models); User user = fetchuser(); if (user != null) { // Navbar ViewBag ViewBag.user_name = user.name(); ViewBag.user_wallet = user.Money; ViewBag.userid = user.Id; } ViewBag.dashboard = true; // Handle the expired auctions before we View them (Candidate for async) _context.ProcessExpiredAuctions(); // Return the view of index with list of auctions attached return(result); }