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 static void Initialize(String connectionNameOrUrl) { IMongoCollection <TUser> collection = MongoDBUtilities.GetDatabase(connectionNameOrUrl).GetCollection <TUser>(MongoDBUtilities.GetUserCollectionName()); EnsureIndexes.UserStore <TUser>(collection); }