File tree Expand file tree Collapse file tree
src/ServiceStack.Authentication.MongoDB Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,14 +52,19 @@ private static string Counters_Col
5252 }
5353 }
5454
55- public MongoDBAuthRepository ( MongoDatabase mongoDatabase )
55+ public MongoDBAuthRepository ( MongoDatabase mongoDatabase , bool createMissingCollections )
5656 {
5757 this . mongoDatabase = mongoDatabase ;
5858
59+ if ( createMissingCollections )
60+ {
61+ CreateMissingCollections ( ) ;
62+ }
63+
5964 if ( ! CollectionsExists ( ) )
6065 {
6166 throw new InvalidOperationException ( "One of the collections needed by MongoDBAuthRepository is missing." +
62- "You can call CreateMissingCollections or DropAndReCreateCollections " +
67+ "You can call MongoDBAuthRepository constructor with the parameter CreateMissingCollections set to 'true' " +
6368 "to create the needed collections." ) ;
6469 }
6570 }
You can’t perform that action at this time.
0 commit comments