Update the documentation pages

This commit is contained in:
OpenIddict Bot
2021-07-03 13:33:55 +00:00
parent b6c3c864e9
commit 768a04f162
447 changed files with 112161 additions and 440 deletions

View File

@@ -81,7 +81,17 @@
// that accepts a connection string or an instance of MongoClientSettings.
options.UseMongoDb()
.UseDatabase(new MongoClient().GetDatabase("openiddict"));
})
});
</code></pre><p>Alternatively, you can register the <code>IMongoDatabase</code> instance as a service:</p>
<pre><code class="lang-csharp">services.AddOpenIddict()
.AddCore(options =&gt;
{
options.UseMongoDb();
});
// Note: to use a remote server, call the MongoClient constructor overload
// that accepts a connection string or an instance of MongoClientSettings.
services.AddSingleton(new MongoClient().GetDatabase(&quot;shared-database-instance&quot;));
</code></pre></li>
<li><p><strong>Create indexes to improve performance</strong> (recommended): for that, you can use the following script to
initialize the database and create the indexes used by the OpenIddict entities:</p>