I want to create an interface for my ApplicationDbContext. However, it inherits from IdentityDbContext.
public class ApplicationDbContext
: IdentityDbContext<ApplicationUser, ApplicationRole, int,
ApplicationUserLogin, ApplicationUserRole, ApplicationUserClaim>, IDbContext
Currently, IDbContext doesn't have any references to the IdentityDbContext tables such as Users, Roles, etc... So when I use the interface in my code anything that is accessing the Identity tables will not work because the interface doesn't include those. I've tried to add an
IDbSet<ApplicationUser>
to my ApplicationDbContext so that I can reference it in the interface but it gets confusing because ApplicationUser is a custom implementation of IdentityUser. How can I create this interface so that I can reference all the tables that my ApplicationDbContext has access to, but through the interface?
DbSet<ApplicationUser> Users { get; set; }in your interface? - DavidG