When switching from EF Core 5 to version 8, the following problem was revealed.
If I do it first:
var task = await _context.Tasks
.Include(t => t.Document)
.ThenInclude(t => t.RouteStepValues)
.FirstOrDefaultAsync(t => t.Id == taskId);
And in the future, I will execute this request with the same DocumentId
that was received earlier with task
:
var document = await _context.Documents
.Include(d => d.RouteStepValues)
.FirstOrDefaultAsync(d => d.Id == documentId);
When further trying to get the RouteStepValue
from the document
, it does not find the values. In the .net 5 version, this did not cause problems, and similar entities were combined.