Find doesn't return my collection
Shift contains a property:
Qualifications
I'm trying to add them to Shifts
and it works!
But when I get Shift using FindCoreAsync
Qualifications
in null
3 Replies
AddCoreAsync
works well, I can write dbContext.Shifts.ToList
and Shift
will contain Qualifications
context.CancellationToken
is indented 1 level too much
also i wouldn't use == in a datetime comparison, i would probably use an epsilon/intervalhard to give some help without the actual context.
from the given information i would log the actual query with all parameters logged as well for both methods and compare while looking at the actual data and compare where there could be a mismatch.
im also not that experienced with ef core, but what everyone and every (not too shabby) tutorial told me is, that u use one dbcontext instance per interaction, u might do that or not, its not obvious so i wanted to mention it just in case