Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Why does EF7 say I haven't configured any providers, when ASP.net Identity is working fine with the exact same DbContext?

$
0
0

Also asked on Stack Overflow: http://stackoverflow.com/questions/35672464/why-does-ef7-say-i-havent-configured-any-providers-when-asp-net-identity-is-wo

Just starting a new MVC6 experimental app. Identity is working fine and I can register and log in. However, when I add my own Product entity to the DbContext, EF7 complains that it can't find a provider.

Why should Identity be able to find the provider while other uses of the exact same DbContext cause an error?

    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            // Customize the ASP.NET Identity model and override the defaults if needed.
            // For example, you can rename the ASP.NET Identity table names and more.
            // Add your customizations after calling base.OnModelCreating(builder);
        }
        public DbSet<SoftwareProduct> SoftwareProduct { get; set; }
    }

--Tim


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>