title: How do I make WebSecurity use the specified connection string in update-database?
body: <p>I have added SimpleMembership to my MVC4 application which uses EF code first.</p>
  
  <p>I wanted to add a couple of users to my database as seed data. When I ran <code>Update-Database</code> the first time everything went fine: my users and passwords were set correctly.</p>
  
  <p>However when I try running it on my alpha server (from visual studio) it does not add my users. </p>
  
  <p>To do this I issue the command</p>
  
  <pre><code>update-database -ConnectionString "&lt;my alpha connection string&gt;"
  </code></pre>
  
  <p>The schema will be updated, but the seed method runs without adding any data.</p>
  
  <p>After some digging I modified my seed method from:</p>
  
  <pre><code>if (!WebSecurity.Initialized)
      WebSecurity.InitializeDatabaseConnection("TestData", "UserProfile", "UserId", "UserName", true);
  </code></pre>
  
  <p>Where <code>TestData</code> is the name of my connection string in the web.config file</p>
  
  <p>to:</p>
  
  <pre><code>if (!WebSecurity.Initialized)
      WebSecurity.InitializeDatabaseConnection("&lt;actualConnectionString&gt;","System.Data.SqlClient", "UserProfile", "UserId", "UserName", true);
  </code></pre>
  
  <p>That added the data to my alpha database.  </p>
  
  <p>So it would appear that when I issue an <code>Update-Database</code> command, WebSecurity is ignoring that connection string and just trying to do it locally.</p>
  
  <p>Is there a setting or option that I'm missing?</p>
  
  <p><strong>Edit</strong> This seeding is done in the Configuration.cs Seed method.</p>