I went through lot of the documentation but did not see any examples for Singleton object By tenant not host. A Object that has instance per tenant. Is there a way to do that in ABP?
2 Answer(s)
-
0
Hi,
What do you mean by "singleton object by tenant"? Do you mean a singleton objects in dependency injection or a database entity. Can you provide details and an example if possible.
-
0
this concept is discussed here <a class="postlink" href="http://benfoster.io/blog/asp-net-core-dependency-injection-multi-tenant">http://benfoster.io/blog/asp-net-core-d ... lti-tenant</a>
"f a singleton is created once per application, you can probably guess that a tenant-singleton is created once per tenant.
So when might you need this scope? Think of any object that is expensive to create or needs to maintain state yet should be isolated for each tenant."