title: How to make an interface class out of ApplicationDbContext?
body: <h3>I am trying to make an interface out of ApplicationDbContext which extends IdentityDbContext.</h3>
  
  <pre><code> public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;, 
                                       IApplicationDbContext
   {
      public ApplicationDbContext()
          : base("AppContext")
      {
  
      }
     // Should I add below line? without any unwanted behavior?
     // public DbSet&lt;ApplicationUser&gt; User { get; set;}
      public  DbSet&lt;Book&gt; Books { get; set; }
   }
  </code></pre>
  
  <h3>My interface will be</h3>
  
  <pre><code> public interface IApplicationDbContext : IDisposable
   {
       // Should I add below line?
       // DbSet&lt;ApplicationUser&gt; User { get;}
       DbSet&lt;Book&gt; Books { get; }
       int SaveChanges();
   }
  </code></pre>
  
  <h3>On problem with this approach is that I loose access to 'Users' that came from IdentityDbContext.Users</h3>
  
  <pre><code> private ApplicationDbContext ctx = new ApplicationDbContext();
  
   ctx.Users.somthing() works
  </code></pre>
  
  <h3>but with below, compiler complains</h3>
  
  <pre><code> private IApplicationDbContext ctx = new ApplicationDbCOntext();
  
   ctx.Users.something..
  </code></pre>
  
  <h3>IApplicationDbContext does not contain a definition for 'Users' and no extensions method 'Users'...</h3>
  
  <p>I think I am missing a crucial concept here.</p>
  
  <p>would you help me out?</p>