Base solution for your next web application
Open Closed

Reference to ABPUser ?!! #1143


User avatar
0
mrvithan created

How to reference to ABp User object from Entity class ?

For example,

[ForeignKey("ApproveManagerId")]
public virtual User ApproveManager {get;set;}

[Required]
 public virtual int      ApproveManagerId    { get; set;

I have tried this way but compile with error.

Please advise.


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

    Hi,

    This is the right way actually. What is the compile error you are getting ?

  • User Avatar
    0
    mrvithan created

    User class is not defined .... seems that i don't know its namespace.

  • User Avatar
    0
    hikalkan created
    Support Team

    If you are using module-zero and created template from aspnetboilerplate.com, then your project should contain a User class. Can you search it?

  • User Avatar
    0
    mrvithan created

    Nope. I try to reference to AbpUser<TTenant, TUser>, but still no luck

  • User Avatar
    0
    mrvithan created

    Ok i can see how already. Thx.