title: ASP.NET Identity DbContext confusion
body: <p>A default MVC 5 App comes with this piece of code in IdentityModels.cs - this piece of code is for all the ASP.NET Identity operations for the default templates:</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public ApplicationDbContext()
          : base("DefaultConnection")
      {
      }
  }
  </code></pre>
  
  <p>If I scaffold a new controller using views with Entity Framework and create a "New data context..." in the dialog, I get this generated for me:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Data.Entity;
  using System.Linq;
  using System.Web;
  
  namespace WebApplication1.Models
  {
      public class AllTheOtherStuffDbContext : DbContext
      {
          // You can add custom code to this file. Changes will not be overwritten.
          // 
          // If you want Entity Framework to drop and regenerate your database
          // automatically whenever you change your model schema, please use data migrations.
          // For more information refer to the documentation:
          // http://msdn.microsoft.com/en-us/data/jj591621.aspx
  
          public AllTheOtherStuffDbContext() : base("name=AllTheOtherStuffDbContext")
          {
          }
  
          public System.Data.Entity.DbSet&lt;WebApplication1.Models.Movie&gt; Movies { get; set; }
  
      }
  } 
  </code></pre>
  
  <p>If I scaffold another controller + view using EF, say for instance for an Animal model, this new line would get autogenerated right under <code>public System.Data.Entity.DbSet&lt;WebApplication1.Models.Movie&gt; Movies { get; set; }</code> - like this:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Data.Entity;
  using System.Linq;
  using System.Web;
  
  namespace WebApplication1.Models
  {
      public class AllTheOtherStuffDbContext : DbContext
      {
          // You can add custom code to this file. Changes will not be overwritten.
          // 
          // If you want Entity Framework to drop and regenerate your database
          // automatically whenever you change your model schema, please use data migrations.
          // For more information refer to the documentation:
          // http://msdn.microsoft.com/en-us/data/jj591621.aspx
  
          public AllTheOtherStuffDbContext() : base("name=AllTheOtherStuffDbContext")
          {
          }
  
          public System.Data.Entity.DbSet&lt;WebApplication1.Models.Movie&gt; Movies { get; set; }
          public System.Data.Entity.DbSet&lt;WebApplication1.Models.Animal&gt; Animals { get; set; }
  
      }
  } 
  </code></pre>
  
  <p><code>ApplicationDbContext</code> (for all the ASP.NET Identity stuff) inherits from <code>IdentityDbContext</code> which in turn inherits from <code>DbContext</code>.
  <code>AllOtherStuffDbContext</code> (for my own stuff) inherits from <code>DbContext</code>.</p>
  
  <p>So my question is:</p>
  
  <p>Which of these two (<code>ApplicationDbContext</code> and <code>AllOtherStuffDbContext</code>) should I use for all my other own models? Or should I just use the default autogenerated <code>ApplicationDbContext</code> since it shouldn't be a problem using it since it derives from the base class <code>DbContext</code>, or will there be some overhead? You should use only one <code>DbContext</code> object in your app for all your models (I've read this somewhere) so I should not even consider using both <code>ApplicationDbContext</code> and <code>AllOtherStuffDbContext</code> in a single app? Or what is best practice in MVC 5 with ASP.NET Identity?</p>