Identity icon indicating copy to clipboard operation
Identity copied to clipboard

IdentityUser should be in Core project?

Open issafram opened this issue 11 years ago • 1 comments

Basically the same question I asked at http://stackoverflow.com/q/30835779/590774

Perhaps I don't understand why some classes are in one project and not the other.

In my eyes, EF is just one mechanism for storing and retrieving the data. It shouldn't be a layer that defines the POCO.

Now I understand that EF is based on Entities, but couldn't there be some inheritance model that is used between the projects?

issafram avatar Aug 17 '15 20:08 issafram

@issafram the design of Identity core is not coupled to EF or to any specific shape of user and role types. Everything is abstracted by the stores. In fact, for any given persistence provider, the types don't even need to be POCOs at all!

We considered having our current POCO types in core (in fact, at some point we had them) but we got pretty solid feedback from people familiar with other persistence frameworks that those types were very EF specific.

We also considered having base classes in core that we would extend for EF in the EF package. We landed where we are because there doesn't seem to be enough benefit in this. It is adding the complexity of layers of inheritance (which would make it easier for us to introduce unintended bugs) vs. the fact that the types the way they are not aren't that complex and that persistence provider writers that want to take them as a starting point are welcome to copy & paste the code.

divega avatar Aug 17 '15 20:08 divega