This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want to use Reverse Poco generator with an existing database, then its easier to script (see below) the asp.net identity tables inside | |
your application DB. Then you can use Reverse Poco generator and connect to the DB and get the POCOs for both your own data tables | |
and the Identity Tables you created. | |
If you are using the MVC template, then name your dbContext the same as what mvc does, (which is ApplicationDbContext). | |
you also need to comment out the MVC templates ApplicationDbContext that is found in the IdentityModels.cs file. | |
in that context, there is a create method. copy that method and put it inside your reverse Poco Generator db context class. | |
and then all the Identity code in the template should work. | |
The goal of all of this was to just get the 5 tables that Identity creates for you , inside your application DB. and then wire up the DbContext code. | |
SQL Script to create the Identity Tables. you can also create a migration and add this SQL into the migration so that it will be versioned |