diff --git a/README.md b/README.md index 8bc68d5..4ac1aee 100644 --- a/README.md +++ b/README.md @@ -55,15 +55,6 @@ services.AddIdentity() .AddDefaultTokenProviders(); ``` -You can also use the more explicit type declaration: - -```csharp -var mongoDbContext = new MongoDbContext("mongodb://localhost:27017", "MongoDbTests"); -services.AddIdentity() - .AddMongoDbStores(mongoDbContext) - .AddDefaultTokenProviders(); -// Use the mongoDbContext for other things. -``` It is also possible to share a common `IMongoDbContext` across your services (requires https://www.nuget.org/packages/MongoDbGenericRepository/): @@ -75,6 +66,16 @@ services.AddIdentity() // Use the mongoDbContext for other things. ``` +You can also use the more explicit type declaration: + +```csharp +var mongoDbContext = new MongoDbContext("mongodb://localhost:27017", "MongoDbTests"); +services.AddIdentity() + .AddMongoDbStores(mongoDbContext) + .AddDefaultTokenProviders(); +// Use the mongoDbContext for other things. +``` + Alternatively a full configuration can be done by populating a `MongoDbIdentityConfiguration` object, which can have an `IdentityOptionsAction` property set to an action you want to perform against the `IdentityOptions` (`Action`). The `MongoDbSettings` object is used to set MongoDb Settings using the `ConnectionString` and the `DatabaseName` properties.