title: DbContext class in Asp.net MVC 5 with Identity 2.0
body: <p>You need to have a context class that derives from DbContext when you're using Entity Framework.</p>
  
  <p>Asp.net Identity uses EF and the default template creates the below class:</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public ApplicationDbContext()
          : base("DefaultConnection", false)
      {
      }
  
      public static ApplicationDbContext Create()
      {
          return new ApplicationDbContext();
      }
  }
  </code></pre>
  
  <p>This class does not derive <strong>directly</strong> from DbContext. For my own data (my classes that I want to persist to the db) should I create my own db context class?</p>
  
  <p>If I want to do an operation that will update both the identity user and one of my own classes, I need to use both contexts. So this does not feel very natural.</p>
  
  <p>Should I keep using the ApplicationDbContext class as context for my own classes as well? Would that work?</p>
  
  <p>What is the best method to use EF for my own classes while using identity?</p>