Base solution for your next web application
Open Closed

AbpSession in domain layer. #9190


User avatar
0
shedspotter created

Hi, I need to create calculated property on core project (domain layer classes) i need to add current user & current tanent id with db value. but i cant get current login user details could you please suggest me any changes.

Thanks in advance.


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

    Hi @shedspotter,

    You can create a domain service and inject IAbpSession into your domain service and return your entity by setting related fields using this domain service.

    Also, you must only allow cretion of your entity using this domain service.

  • User Avatar
    0
    robert created
    Support Team

    For working with IAbpSession please refer to this :

    https://aspnetboilerplate.com/Pages/Documents/Abp-Session

  • User Avatar
    0
    shedspotter created

    Thanks for solution