title: Entity Framework - OnModelCreating with Model First
body: <p>I have a Entity Framework model set up with text templates to generate the code. However, one of them creates the <code>DBContext</code> containing an <code>OnModelCreating</code>.</p>
  
  <pre><code>    protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          throw new UnintentionalCodeFirstException();
      }
  </code></pre>
  
  <p>How do expand on this, since a partial class with the same override does not work.</p>