title: Database.SetInitializer() in a static constructor?
body: <p>Many are perhaps aware of why we need to use the code shown below. However, I want to separate this logic into layers and I don't want to reference the Entity Framework DLL in my web layer, thus I ended up putting this code in a static constructor of my <code>DbContext</code> class.</p>
  
  <p>Is this a bad idea? Will there be a performance hit on the app by doing this?</p>
  
  <pre><code>Database.SetInitializer&lt;DataContext&lt;T&gt;&gt;(null);
  </code></pre>