0
When using Asp.net Identity, a single bank is generated. And it is recommended to leave this bank only for Identity and create another bank for your application, as I read in some articles.
So far so good... Then I went to see a video lesson (link in the last line) of Eduardo Pires where he creates an User entity in the domain of the application with the same data of the table "Aspnetusers", and in the repository he points to the Identity database and maps the User entity to the table "Aspnetusers" and with that, I can move the Identity User table as if it were in my system database.
And my doubt arises from there:
In my application I must also have a User, but with data related to the business (CPF, City, Products List, Otherside, etc), in addition to the data already contained in the table Aspnetusers. But I cannot point this User to the Identity database, because then it would already be mixing tables from the application database with the Identity database. However I need the Identity table to do the User control. How can I do this separation?
Link to the video lesson: https://www.youtube.com/watch?v=GGPANv47Z3k (from the minute 30:20)
Project at Github: https://github.com/EduardoPires/IdentityIsolation/tree/master/src
Why "[...] it is recommended to leave this bank only for Identity and create another bank for your application"?
– Jéf Bueno
I agree with the point of @jbueno. What would be the reason? Bank is bank. Use of entities will depend exclusively on your model.
– OnoSendai
This recommendation of separation doesn’t make any sense, so much so that there is this package that integrates Identity with the Entity Framework. This video classroom is a collection of bad practices.
– Leonel Sanches da Silva
So I can add data, relationships in Aspnetusers and other Identity tables without any problem? Because I thought it was strange to have two banks for a single application.
– Raphael
It doesn’t have to be two banks, you can put it all in one database alone, I think it’s even easier to work like this.
– Ricardo
'Cause it’s Ricardo, I think, but since I’m a beginner I’m still a little confused. I’ll work with a bank.
– Raphael
I use Identity in my external bank without any problem.... and detail, customized. The cool version 2.x is precisely for having more flexibility.
– Almeida