public IActionResult Index() { if (TempData["TutorModel"] != null) { UserCache userCache = JsonConvert.DeserializeObject <UserCache>(TempData["TutorModel"].ToString()); PaymentModel paymentModel = new PaymentModel { User = userCache.Extract(), }; paymentModel.hasHasBlInfo = PaymentDB.HasBillingInfo(paymentModel.User.UserId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); paymentModel.PaidSessions = PaymentDB.GetPaidSessions(paymentModel.User.UserId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); Console.WriteLine("Date Name Operation Amount Captured?"); TempData.Keep("TutorModel"); return(View(paymentModel)); } return(View(new PaymentModel())); }