title: How to migrate from SimpleMembership to ASP.NET.Identity
body: <p>Migrating from MVC4 to MVC5 and want to use ASP.NET Identity too but I am struggling to find anything that covers everything I think I need to do to migrate the Identity. <a href="http://kevin-junghans.blogspot.co.uk/2014/02/migrating-existing-website-from.html" rel="nofollow noreferrer">Migrating an Existing Website from SimpleMembership to ASP.NET Identity</a> suggests all I need to do is create an <code>ApplicationUser</code> and migrate the data, and other web searches give me sql scripts and passowrd hashing advice. But there are other loose ends that I'd like to clear up before I jump in.</p>
  
  <p>First - I have code to initialise the membership system in my Seed method:</p>
  
  <pre><code>if (!WebSecurity.Initialized)
      WebSecurity.InitializeDatabaseConnection(Config.ConnectionStringName,
          Config.UsersTableName,
          Config.UsersIDColumn,
          Config.UserNameColumn,
          autoCreateTables: true);
  </code></pre>
  
  <p>So that needs to go right?</p>
  
  <p>Second - it looks like I need an <code>IdentityDbContext</code>. So should I change my existing context to inherit that?</p>
  
  <p>i.e. instead of my current code <code>public class SID2013Context : DbContext</code> do this: <code>public class SID2013Context : IdentityDbContext&lt;ApplicationUser&gt;</code></p>
  
  <p>Will that generate a migration that creates the new tables I need to support ASP.NET Identity?</p>
  
  <p>Once I've done that I should be able to pull in the <code>AccountController</code>, Views, ViewModels and start up code that is generated for an MVC5 project.</p>
  
  <p>Can anyone answer the specific questions here and/or point me to a better resource?</p>