locked
ASP.Net Identity with Model First RRS feed

  • Question

  • User1746765325 posted

    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.

    Thank you.

    Thursday, March 3, 2016 5:05 PM

Answers

  • User614698185 posted

    Hi jsstudz,

    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.

    Please see: http://forums.asp.net/t/1989219.aspx?How+can+ASP+NET+Identity+be+used+with+a+Model+First+application+

    Best Regards,

    Candice Zhou

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 4, 2016 3:20 AM