0
pablo@ccalp.net created
- ABP Framework version: v7.0
- UI type: Angular
- DB provider: EF Core
I want to implement a background job using the framework (abp) default implementation. I created a Domain service and I'm passing the tenantid as a parameter and then changing the CurrentTenant. I'm also getting the DbContext from the repository to query the database, but getting an exception saying that it cannot access a disposed context. What is the right approach to be able to create multitenant aware background jobs? I would need to get the user ingo that submitted the job too.
1 Answer(s)
-
0
Hi, I recommend you to use unit of work when you get error about Context dispose. You can review the document. My suggestion is to use IUnitOfWorkManager. https://docs.abp.io/en/abp/latest/Unit-Of-Work#iunitofworkmanager