Last post Mar 04, 2016 03:20 AM by Candice Zhou
Mar 03, 2016 05:05 PM|jsstudz|LINK
I am trying to implement ASP.Net identity with a Model First data schema approach.
I was wondering if anyone had any experience with this? Ultimately I'm going to customize ASP.Net Identity to suit the needs of our project. But it seems like there are zero solutions to implementing it with a Model first project.
How can I tell Identity with Context to use in a Model first approach? If it's even possible at all.
Mar 04, 2016 03:20 AM|Candice Zhou|LINK
If you intend to work with Model First. Generate the Model either from Code First or DB First.
For example, if I want to work with Model. I can generate it from DB using few simple steps:
> Right Click on the Model Folder in MVC project Solution Explorer > Add New Item
> Data > Choose ADO.NET Entity Data Model > Model1.edmx > Click Add
You may modify or work on the Models now.
Make changes or do what is needed then you may generate the code or update the Database.
Right Click on the surface of the edmx diagram and you may:
•> Update Model from DataBase
•> Generate Database from Model
•> Add Code Generation Item - it will use EF5.x DbContextGenerator or EF6.x DbContextGenerator
It will take you to Code First or DB First or you may take control from here and go with Model First.
Any change you make in the Model it can be propagated in both way and same stands for vice-versa.