title: How to dynamically load connection string from web.Config in Entity Framework 4.0?
body: <p>In LinqToSql I could write an empty constructor if I set the Connection string to (None). In that empty constructor I could then pull the connection string from the web.Config like so:</p>
  
  <pre><code>    public CustomDataDataContext() :
    base( ConfigurationManager.ConnectionStrings[ "DB" ].ConnectionString, mappingSource )
  {
    OnCreated();
  }
  </code></pre>
  
  <p>I am trying to do the same thing now in Entity Framework 4.0. Is this possible somehow? I can't seem to get rid of their generated paramaterless constructor. I would rather not wrap the context in a new class that feeds the context the connection string to the context if I do not have to. </p>