Open Closed

Extending IdentityUser (AppUser) in a DDD based abp.io application #2286


User avatar
0
Radoslav created

I asked this question on stackoverflow: Extending IdentityUser (AppUser) in a DDD based abp.io application Now (after version 4.4+) that EntityFrameworkCore.DbMigrations was removed and AppUser custom class is removed or discouraged, I was wondering how to conveniently extend User profile/identity to have all kid of sorts of relationships: 1 to 1 1 to many many to 1 (+ extra simple property types) ... with IdentityUser so that EF migration works well, enable easy retrieval and updates to extra properties from GUI.

The documentation only mentioned a simple string type SSN and it is spread across many extensibility topics. It is not quite clear about GUI and EF migration adjustments to accommodate simple types, navigation properties, collections to other entities. I would like to see a more complex example following good DDD practice in the version 4.4/5+ involving these cases above. I am aware of many questions/answers about using AppUser, but there are hardly any decent examples on how to do it after removal of EF migration project. I would prefer to have a custom AppUser class where I can add extra properties and relationships.

Maybe I need to have 1 to 1 relationship between IdenityUser class and this new AppUser class. What if I want to have several classes of user that need to inherit from IdentityUser class? Thanks Rad


1 Answer(s)
  • User Avatar
    0
    cotur created

    Hi,

    Could you please check " The AppUser Entity & Custom Properties " section at following article.

    https://community.abp.io/articles/unifying-dbcontexts-for-ef-core-removing-the-ef-core-migrations-project-nsyhrtna

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15