title: WebSecurity.InitializeDatabaseConnection doesn't cooperate with code first migrations
body: <p>In my project I use WebSecurity and EF code first migrations.</p>
  
  <p>I have my custom UserProfile class I want to combine with WebSecurity.</p>
  
  <p>I want to seed users in migrations' Configuration class in Seed method.</p>
  
  <p>So I try this:</p>
  
  <pre><code>#1)
  if (!Roles.RoleExists("admin"))
              Roles.CreateRole("admin");
  
  if (!WebSecurity.UserExists(AdminUserName))
      WebSecurity.CreateUserAndAccount(
          AdminUserName,
          "admin",
          new {Email = "admin@mindmap.pl"});
  </code></pre>
  
  <p>But it complains that I should call WebSecurity.InitializeDatabaseConnection first.</p>
  
  <p>Ok, that makes sense. So I added the following lines to my Global.asax:</p>
  
  <pre><code>#2)
  WebSecurity.InitializeDatabaseConnection(
      _connectionStringName,
      "UserProfiles",
      "Id",
      "UserName",
      autoCreateTables: true);
  </code></pre>
  
  <p>But than the following lines:</p>
  
  <pre><code>#3)
  var dbMigrator = new DbMigrator(_configuration);
  dbMigrator.Update();
  </code></pre>
  
  <p>throw the error:</p>
  
  <blockquote>
    <p>There is already an object named 'UserProfiles' in the database.</p>
  </blockquote>
  
  <p>Well, this makes sense again as migrations try to create the table that's just been created by WebSecurity.</p>
  
  <p>I found out a workaround: I placed #2) right on top of #1). Than it worked.</p>
  
  <ol>
  <li>Migrations created the UserProfiles table</li>
  <li>WebSecurity attached to the existing UserProfiles table and created other tables it needed</li>
  <li>Seeds works as they found the needed tables and WebSecurity was initialized.</li>
  </ol>
  
  <p>The problem is that I had to initialize the WebSecurity inside the seed method, which is kind of smelly. </p>
  
  <p>My question is how to move WebSecurity.InitializeDatabaseConnection back to Global.asax?</p>