title: SQL Server Express connection string for Entity Framework Code First
body: <p>I am working in Visual Web Developer 2010 Express, and using the Entity Framework code-first CTP. I am able to do this with the new SQL Server CE but I am unable to find a connection string to work with SQL Server Express.</p>
  
  <p>This one, using the SQL Server CE beta, works fine (database is created and recreated on model changes).</p>
  
  <pre><code>&lt;add name="TrempimModel"
       connectionString="data source=|DataDirectory|TrempimModel.sdf"
       providerName="System.Data.SqlServerCe.4.0" /&gt;
  </code></pre>
  
  <p>This one, which I copied from the <code>aspnetdb</code> connections string,</p>
  
  <pre><code>&lt;add name="TrempimModel"
       connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;
       AttachDBFilename=|DataDirectory|TrempimModel.mdf;User Instance=true"
       providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p>Gives the following message on startup: </p>
  
  <blockquote>
    <p>Unable to complete operation. The supplied SqlConnection does not specify an initial catalog</p>
  </blockquote>
  
  <p>So how to make it work with SQL Server Express?</p>