Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.


ASP.NET Identity 3.0 provider for Entity Framework 6

For a more detailed explanation of the motivation, see my blog post:

Getting Started: Sample ASP.NET 5 MVC 6 solution project with ASP.NET Identity 3 and Entity Framework 6

You will find a complete sample with everything set up in the repository:

If you need to add this to your own MVC project, just reference Microsoft.AspNet.Identity.EntityFramework6 and place the following in the ConfigureServices method of your Startup.cs file:

//Inject ApplicationDbContext in place of IdentityDbContext and use connection string
services.AddScoped<IdentityDbContext<ApplicationUser>>(context =>
    new ApplicationDbContext(Configuration["Data:DefaultConnection:ConnectionString"]));

//Configure Identity middleware with ApplicationUser and the EF6 IdentityDbContext
services.AddIdentity<ApplicationUser, IdentityRole>(config =>
    config.User.RequireUniqueEmail = true;

You can use ApplicationUser and IdentityDbContext to modify the model further. This is currently not released as a Nuget package, although if there is interest we could do that on MyGet.

Missing functionality

EF7 and ASP.NET Identity 3 by design run on DNX Core. EF6 doesn't, so inheritantly this library will not run on true Core and I haven't put effort in this direction.

The current build also excludes EF6 migrations capability - feel free to contribute this in.


Please note that I've used the Microsoft.AspNet.* namespace in the hope that Microsoft might want to include this in the Identity repository.

At this stage Microsoft do not support this library and it is not an official Microsoft library that is part of the official ASP.NET Identity 3 for which we get great support.


ASP.NET Identity 3.0 provider for Entity Framework 6



No releases published


You can’t perform that action at this time.