Lazy loader throwing invalid operation exceptions #32390
Labels
area-dbcontext
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
regression
Servicing-approved
type-bug
Milestone
File a bug
Include your code
Assuming it's because of concurrent access to memory cached entities after they have been loaded and the DbContext has already been disposed.
Reproduction repository: https://github.com/MoazAlkharfan/efcore-issue-32390
Places to check:
TagsCacheService
fetch data from dbProgram
mapped/
endpointServerRequest
do get requests on the/
endpointInclude stack traces
For the first:
efcore/src/EFCore/Infrastructure/Internal/LazyLoader.cs
Lines 181 to 183 in 141740f
efcore/src/EFCore/Infrastructure/Internal/LazyLoader.cs
Lines 185 to 195 in 141740f
For the second:
Include provider and version information
EF Core version: 8.0
Database provider: (Microsoft.EntityFrameworkCore.SqlServer)
Target framework: (.NET 8.0)
Operating system: Windows/Linux
IDE: (Visual Studio 2022 17.9)
The text was updated successfully, but these errors were encountered: