Base solution for your next web application
Open Closed

Question regarding ABPUsers #1919


User avatar
0
jamesabraham created

Hi I have two questions.

  1. How can I add a reference to ABPUsers in my Person entity? I just wanted to create an extension to user account (i.e ABPUsers) for my application. So I thought to create a Person class with a foreign key reference to ABPUsers.

  2. Can I add more fields into ABPUsers? If so, is that a good practice?

Kindly advise.

Thanks, James


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Yes you can do that. In order to do that create a user class of your own like this

    public class User : AbpUser<User>
    {
        ....
    }
    

    and reference this entity in your Person entity. In order to add new properties to it, you can read this document <a class="postlink" href="https://aspnetzero.com/Documents/Extending-Existing-Entities">https://aspnetzero.com/Documents/Extend ... g-Entities</a>.

    It's a good practice actually.

  • User Avatar
    0
    jamesabraham created

    Thank you very much ismcagdas!!!