Changing the Identity Database for MVC 5 / ASP.NET / .Net 4.5

Re-targeting your authentication to a different database

All you really need to do is update the connectionString part of the

<connectionStrings><add name="..." connectionString="CHANGE THIS HERE" .../>

Adding values to the Identity Model

  1. In IdentityModels.cs, public class ApplicationUser { ... [Add a property] ...} // This adds the property to the user profile.

  2. If this is code first in the package manager:
    1. # Enable-migration
    2. # Add-migration [new-name]
    3. # Update-database
  3. Change AccountViewModels.cs, public class RegisterViewModel { ... [Add a property] ...} 

  4. Update Register.cshtml [Add code for new property]

  5. AccountController.cs Add: user.[New Property] = model.[New Property]

ProgrammingLinks/ChangeIdentityDatabase (last edited 2015-06-25 21:14:50 by scot)