title: How to implement own DBContext and still use the given ApplicationUser with Authentication in ASP.Net Core?
body: <p>I create a new Project with authentication:</p>
  
  <p><a href="https://i.stack.imgur.com/QVyzC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QVyzC.png" alt="enter image description here"></a>
  Now i got this ApplicationDBContext in startup which is fine.</p>
  
  <pre><code>  public void ConfigureServices(IServiceCollection services)
      {
          // Add framework services.
          services.AddApplicationInsightsTelemetry(Configuration);
  
          services.AddDbContext&lt;ApplicationDbContext&gt;(options =&gt;
              options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
  
          services.AddIdentity&lt;ApplicationUser, IdentityRole&gt;()
              .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;()
              .AddDefaultTokenProviders();
  
          services.AddMvc();
  
          // Add application services.
          services.AddTransient&lt;IEmailSender, AuthMessageSender&gt;();
          services.AddTransient&lt;ISmsSender, AuthMessageSender&gt;();
      }
  </code></pre>
  
  <p>I saw in some tutorials that they create their own DbContext for specific usage and add it into startup. but if i want to use the ApplicationUser and my own Database tables how do i handle this dependencies?</p>
  
  <p>I can't figure out what i should do here:</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public ApplicationDbContext(DbContextOptions&lt;ApplicationDbContext&gt; options)
          : base(options)
      {
      }
  
      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);
      }
  }
  </code></pre>
  
  <p>I know that IdentityUser has inherits DbContext, but where do i set my tables and still have User implementation?</p>
  
  <p>i thought something like this but i really don't know how i should to that correctly?</p>
  
  <p><a href="https://i.stack.imgur.com/xa79U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xa79U.png" alt="enter image description here"></a></p>