Skip to content

Instantly share code, notes, and snippets.

@JudahGabriel
Created September 27, 2017 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JudahGabriel/d3b43c5624da0e7617a3c50dab8b34d1 to your computer and use it in GitHub Desktop.
Save JudahGabriel/d3b43c5624da0e7617a3c50dab8b34d1 to your computer and use it in GitHub Desktop.
public void ConfigureServices(IServiceCollection services)
{
// Add RavenDB and identity.
services
.AddRavenDb(Configuration.GetConnectionString("RavenDbConnection")) // Create a RavenDB DocumentStore singleton.
.AddRavenDbAsyncSession() // Create a RavenDB IAsyncDocumentSession for each request.
.AddRavenDbIdentity<AppUser>(); // Use Raven for users and roles. AppUser is your class, a simple DTO to hold user data. See https://github.com/JudahGabriel/RavenDB.Identity/blob/master/Sample/Models/AppUser.cs
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment