You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While investigating some performance issues I noticed that AuditLogDetails collection is Lazy Loaded. That is fine, however sometimes when I want to iterate over it I end up with multiple queries that loads details one by one. Which is once again completely understandable because of the N+1 problem.
The problem is that I cannot load this collection eagerly. Include(l =l.LogDetails) does not help.
My guess is that after calling GetLogs method from your TrackerContext does something to the api that makes Include misbehave.
So far only workaround I found is to retrieve logs straight from DbContext and then Include works properly but you created GetLogs method probably to avoid retrieving logs like that.
Do you think adding another method like GetLogsEager would be possible in near future?
Regards
The text was updated successfully, but these errors were encountered:
Hi once more,
While investigating some performance issues I noticed that AuditLogDetails collection is Lazy Loaded. That is fine, however sometimes when I want to iterate over it I end up with multiple queries that loads details one by one. Which is once again completely understandable because of the N+1 problem.
The problem is that I cannot load this collection eagerly. Include(l =l.LogDetails) does not help.
My guess is that after calling GetLogs method from your TrackerContext does something to the api that makes Include misbehave.
So far only workaround I found is to retrieve logs straight from DbContext and then Include works properly but you created GetLogs method probably to avoid retrieving logs like that.
Do you think adding another method like GetLogsEager would be possible in near future?
Regards
The text was updated successfully, but these errors were encountered: