Example #1
0
        /// <inheritdoc />
        public IdentityConfiguration(IdentityDatabaseContextFactory databaseContextFactory)
        {
            Check.DoRequireArgumentNotNull(databaseContextFactory, nameof(databaseContextFactory));

            _roleManager = ApplicationRoleManager.CreateOutOfContext(databaseContextFactory);
            _userManager = ApplicationUserManager.CreateOutOfContext(databaseContextFactory);
        }
Example #2
0
        public static ApplicationRoleManager CreateOutOfContext(IdentityDatabaseContextFactory databaseContextFactory)
        {
            Contract.Requires(databaseContextFactory != null);

            return(new ApplicationRoleManager(databaseContextFactory.RoleStore));
        }
Example #3
0
        public IdentityDatabaseContext(IdentityDatabaseContextFactory contextFactory)
        {
            Contract.Requires(contextFactory != null);

            ContextFactory = contextFactory;
        }
Example #4
0
 public static ApplicationUserManager CreateOutOfContext(IdentityDatabaseContextFactory databaseContextFactory)
 {
     return(new ApplicationUserManager(databaseContextFactory.UserStore));
 }