public AuthRepository() { _ctx = new ThegioistickerEntities(); //var provider = new DpapiDataProtectionProvider("Thegioisticker"); _userManager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(_ctx)); var provider = new DpapiDataProtectionProvider("YourAppName"); _userManager.UserTokenProvider = new DataProtectorTokenProvider <ApplicationUser, string>(provider.Create("UserToken")) as IUserTokenProvider <ApplicationUser, string>; _roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(_ctx)); }
public ThegioistickerEntities Init() { return(dbContext ?? (dbContext = new ThegioistickerEntities())); }