public IndexModel( UserManager <IdentityUser> userManager, SignInManager <IdentityUser> signInManager, horizonp_questcredentialsContext context) { _userManager = userManager; _signInManager = signInManager; _context = context; }
public override void OnActionExecuted(ActionExecutedContext filterContext) { if (User != null) { var context = new horizonp_questcredentialsContext(); var currentUserId = User.FindFirstValue(ClaimTypes.NameIdentifier); if (!string.IsNullOrEmpty(currentUserId)) { var user = context.Users.SingleOrDefault(u => u.CredentialsId == currentUserId); ViewData["LoggedUserBalance"] = context.Wallet.FirstOrDefault(m => m.UserId == user.UserId)?.Balance ?? 0; ViewData.Add("UserLogin", user?.Gender); } } base.OnActionExecuted(filterContext); }
public GroupsController(horizonp_questcredentialsContext context) { _context = context; }
public UserInventoriesController(horizonp_questcredentialsContext context) { _context = context; }
public HomeController(ILogger <HomeController> logger, horizonp_questcredentialsContext context, SignInManager <IdentityUser> signInManager) { _logger = logger; _context = context; _signInManager = signInManager; }