This project is read-only.

Any support for IdentityDbContext with EF Db First?

Jan 7, 2014 at 2:19 PM
Edited Jan 7, 2014 at 2:19 PM
I want to know If there is any support(or plan) for Db First DbContext ? As a discussion in at we found a poor work around.

In enterprise level applications you need of joins between your tables and AspNetUsers table to provide record's related user. (i.e. senderUserId, reciverUserId, creatorUserId, managerUserId and so on...).Moreover in grids you need filter by the users too... None of this are possible without an integrated DbContext model.

Currently I prefer to make a mirror table to copy all the users needed data into it(by triggers). But I will have two seprated DbContext. One to handle my logings actions and one to handle my business flows... but it is nasty :(
Apr 13, 2014 at 5:13 PM
Edited Sep 7, 2014 at 7:31 AM
Take a look at these projects on GitHub:
Which includes:
  • SQL Database Project Template for ASP.NET Identity 2.0
  • Entity Framework Database-First Provider(s)
  • Source Code and Samples
enter image description here
Jun 15, 2014 at 4:04 AM
Edited Jun 15, 2014 at 4:04 AM
It would be nice if Model First and Database First were treated like first class citizens. Not everyone uses Code First. Seems the other approaches have been all but abandoned to Code First. All three approaches should be able to be used interchangeably - modify the database and import the changes, modify the model and export the changes, modify the classes and update the model and database. Identity is too hard and confusing to use from Model First.
Sep 6, 2014 at 3:52 PM
Edited Sep 8, 2014 at 4:46 PM
(comment removed)
Mar 10, 2015 at 7:01 PM
As davekolb says, I am currently facing the problem of needing to implement Identity in a Database First Environment and I'm totally lost. Please make it possible straight forward.

It is really bad when you start feeling that the technology you love is playing against you. We want to be able to use all the new features no matter the approach we have to take.