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
In IdentityModels.cs, public class ApplicationUser { ... [Add a property] ...} // This adds the property to the user profile.
- If this is code first in the package manager:
- # Enable-migration
- # Add-migration [new-name]
- # Update-database
Change AccountViewModels.cs, public class RegisterViewModel { ... [Add a property] ...}
Update Register.cshtml [Add code for new property]
AccountController.cs Add: user.[New Property] = model.[New Property]