Answered by:
Creating an identity 2 database

Question
-
User-973886032 posted
Hi guys
I am finally moving from membership provider to identity 2
I have been reading up resources on it and though I understand it. I can't seem to find the application equivalent to reg_sql which would create the identity database
How do I go about this ?
Thanks
EhiSaturday, April 30, 2016 11:34 AM
Answers
-
User475983607 posted
Identity uses code first so the easiest method is simply create a new project and login. The new project template will build the required tables. Once you have the tables built the way you like then use SSMS to create the CREATE scripts, if needed.
If you are attempting to integrate Identity into ASP membership schema, then you'll need to implement a custom User Store by implementing the various Identity Interfaces.
Or take a look at ASP.NET's recommendation for migrating.
If you looking for SQL to create the tables then see the following.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, April 30, 2016 12:30 PM
All replies
-
User475983607 posted
Identity uses code first so the easiest method is simply create a new project and login. The new project template will build the required tables. Once you have the tables built the way you like then use SSMS to create the CREATE scripts, if needed.
If you are attempting to integrate Identity into ASP membership schema, then you'll need to implement a custom User Store by implementing the various Identity Interfaces.
Or take a look at ASP.NET's recommendation for migrating.
If you looking for SQL to create the tables then see the following.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, April 30, 2016 12:30 PM -
User36583972 posted
Hi afrika,
I found some tutorials in the below for your reference.
1: SQL Database Project for ASP.NET Identity 2.0
2: Database First:
https://msdn.microsoft.com/en-us/data/jj206878.aspx
Best Regards,
Yohann Lu
Monday, May 2, 2016 8:12 AM -
User-1780421697 posted
Easy approach is to create a new project with authentication option. As Identity uses Code First approach you need to add/update attributes in ApplicationUser class according to your needs when all done change the connection string of application and point to your database, Now tricky step is that you have to perform migration.
Migration is process in which you actually perform database related operation.
Tuesday, May 3, 2016 10:22 AM