You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using a DB Context that extends IdentityDbContext<TUser, TRole, TKey> and TKey is a Guid or an int, the following error happens on add migration:
"No data stores are configured. Configure a data store by overriding OnConfiguring in your DbContext class or in the AddDbContext method when setting up services."
This can be repeated by starting with a ASP.Net 5 web project created with Visual Studio 2015 RC and using the ApplicationUser and Role models and the ApplicationDbContext shown below:
public class ApplicationUser : IdentityUser<Guid>
{
public ApplicationUser()
{
}
}
public class ApplicationRole : IdentityRole<Guid>
{
public ApplicationRole()
{
}
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser, ApplicationRole, Guid>
{
...
}
And initializing the service in the Startup.cs file by using