0
hozkar created
Hi!
When i am going to insert a record, i need to define its tenantId.
At this moment, what i am doing is to query AbpSession in my Service to obtain the TenantId of the user; then asign it to the record and save it with the aproppiate repository.
Is this the recommended approach?
Thanks in advance.
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
1 Answer(s)
-
0
Hi,
There is a waiting enhanchment (<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/431">https://github.com/aspnetboilerplate/as ... issues/431</a>) that will set TenantId automatically ic certain cases. You should to set it now manually.
Yes, it's suggested way you do. Set AbpSession.TenantId to entities which implements IMayHaveTenant or IMustHaveTenant.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)