コード例 #1
0
        public IdentityStoreService(IIdentityStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName, new MongoDatabaseSettings()
            {
            });

            Users = new MongoDbItemManager <ApplicationUser>(
                database.GetCollection <ApplicationUser>(settings.UsersCollectionName));
            Roles = new MongoDbItemManager <ApplicationRole>(
                database.GetCollection <ApplicationRole>(settings.RolesCollectionName));
        }
コード例 #2
0
 public UserStore(IdentityStoreService identityStoreService)
 {
     _userManager = identityStoreService.Users;
 }
コード例 #3
0
 public RoleStore(IdentityStoreService identityStoreService)
 {
     _roleManager = identityStoreService.Roles;
 }