I am attempting to get away from code-first migrations.
The problem is that AspNetUsers is extending IdentityUser. As a result, when I try to use a DbContext then I get the following errors.
- EntityType 'IdentityUserLogin' has no key defined. Define the key for this EntityType.
- EntityType 'IdentityUserRole' has no key defined. Define the key for this EntityType.
I want to use AspNetUsers for two purposes:
- Identity management.
- Querying users from the database.
Is it possible to go this route without having to use IdentityDbContext?
public class MyEntities : DbContext
{
public DbSet<AspNetUsers> AspNetUsers { get; set; }
}