Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,19 @@ private static string Counters_Col
}
}

public MongoDBAuthRepository(MongoDatabase mongoDatabase)
public MongoDBAuthRepository(MongoDatabase mongoDatabase, bool createMissingCollections)
{
this.mongoDatabase = mongoDatabase;

if (createMissingCollections)
{
CreateMissingCollections();
}

if (!CollectionsExists())
{
throw new InvalidOperationException("One of the collections needed by MongoDBAuthRepository is missing." +
"You can call CreateMissingCollections or DropAndReCreateCollections " +
"You can call MongoDBAuthRepository constructor with the parameter CreateMissingCollections set to 'true' " +
"to create the needed collections.");
}
}
Expand Down