title: Creating local database with Entity Framework Code First
body: <p>I have problem with creating local db with EF code first. When I try create db with command <code>update-database</code> Visual Studio returns the error: </p>
  
  <blockquote>
    <p>A network-related or instance-specific error occurred while
    establishing a connection to SQL Server. The server was not found or
    was not accessible. Verify that the instance name is correct and that
    SQL Server is configured to allow remote connections. (provider: SQL
    Network Interfaces, error: 26 - Error Locating Server/Instance
    Specified)</p>
  </blockquote>
  
  <p>In earlier project I haven't any problem with do that.</p>
  
  <p>Context Class</p>
  
  <pre><code>public class Context : DbContext {
  
      public DbSet&lt;Project&gt; Projects { get; set; }
      public DbSet&lt;Task&gt; Tasks { get; set; }
      public DbSet&lt;Team&gt; Teams { get; set; }
      public DbSet&lt;User&gt; Users { get; set; }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder) {
          modelBuilder.Conventions.Remove&lt;PluralizingTableNameConvention&gt;();
  
          modelBuilder.Ignore&lt;IIdentifableEntity&gt;();
  
          modelBuilder.Entity&lt;Project&gt;().HasKey(p =&gt; p.Id).Ignore(p =&gt; p.EntityId);
          modelBuilder.Entity&lt;Task&gt;().HasKey(t =&gt; t.Id).Ignore(t =&gt; t.EntityId);
          modelBuilder.Entity&lt;Team&gt;().HasKey(t =&gt; t.Id).Ignore(t =&gt; t.EntityId);
          modelBuilder.Entity&lt;User&gt;().HasKey(u =&gt; u.Id).Ignore(u =&gt; u.EntityId);
      }
  
  }
  </code></pre>
  
  <p><a href="https://gist.github.com/KSYMEK/2f1b3d4a1a3b8551a58e964008fa38cd#file-gistfile1-txt" rel="nofollow noreferrer">App.config</a></p>
  
  <p>Thank you for any help.</p>