public UserStore(String connectionNameOrUrl) { this.database = MongoDBUtilities.GetDatabase(connectionNameOrUrl); this.collection = database.GetCollection <TUser>(MongoDBUtilities.GetUserCollectionName()); this.roleCollection = database.GetCollection <IdentityRole>(MongoDBUtilities.GetRoleCollectionName()); this.disposed = false; }
public RoleStore(String connectionNameOrUrl) { String roleCollectionName = MongoDBIdentitySettings.Settings != null ? MongoDBIdentitySettings.Settings.RoleCollectionName : "role"; this.database = MongoDBUtilities.GetDatabase(connectionNameOrUrl); this.collection = database.GetCollection <TRole>(MongoDBUtilities.GetRoleCollectionName()); this.disposed = false; }
public static void Initialize(String connectionNameOrUrl) { IMongoCollection <TRole> collection = MongoDBUtilities.GetDatabase(connectionNameOrUrl).GetCollection <TRole>(MongoDBUtilities.GetRoleCollectionName()); EnsureIndexes.RoleStore <TRole>(collection); }