0
sparkyjr created
I am using repositories GetAll() method to fetch some data from the repository. But when I use [UnitOfWork(IsDisabled=true)] in controller and application service, GetAll() method is throwing an exception.
The exception that is thrown is "DbContext has been disposed."
Please suggest how to go about this issue.
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
1 Answer(s)
-
0
You want to "fetch some data" but you're preventing ABP from opening a database connection for you.
So, Begin a UnitOfWork yourself: https://aspnetboilerplate.com/Pages/Documents/Unit-Of-Work#iunitofworkmanager
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)