How should customize ASP.Net Identity

After lots of read about ASP.Net Identity, I’m still confused about some sort of things that newly added to ASP.Net authentication system.

  • How should I use ASP.Net Identity if I have already a designed database with its User management tables? for example I want to map AspNetUsers table to my own table named UserAccounts.
  • How should I mix this new system with existing ASP.Net MVC application?
  • What if I don’t want to use code-first (Identity uses code-first)?

Any advice will be helpful.
Thanks in Advance.


1 Solution
Solution

You have to use the Entity Framework Migrations, here some good links that can help you:

http://blogs.msdn.com/b/webdev/archive/2013/10/16/customizing-profile-information-in-asp-net-identity-in-vs-2013-templates.aspx

http://www.asp.net/identity/overview/migrations/migrating-an-existing-website-from-sql-membership-to-aspnet-identity

At this link you can migrate from MVC4 to MVC5

http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2

and at the last if you don’t want to use the EF i don’t think you can use identity, asp.net identity need these nuget packages:

Nuget packages

Microsoft.Aspnet.Identity.Core
    This package contains the core interfaces of ASP.NET Identity.
    core

Microsoft.Aspnet.Identity.EntityFramework
    This package contains the implementation of ASP.NET Identity system which works with Entity Framework. This means that if you use this package then you can store information in a Sql Server database.

http://blogs.msdn.com/b/webdev/archive/2013/06/27/introducing-asp-net-identity-membership-system-for-asp-net-applications.aspx