Loading...
Loading...
Browse 4 real-world technical and behavioral interview questions about Dotnet. Review scenarios, edge cases, and architectural best practices.
The context snapshots every entity it loads so it can work out what changed at save time, which is useful for a handful of entities and pure overhead for a read. AsNoTracking removes the snapshot, and the same mechanism explains why a stray mutation on a tracked entity gets written even though you never called Update.
The kernel kills you on everything in the cgroup, while the GC only reports the managed heap. Committed-but-empty heap, per-core Server GC heaps, thread stacks, native buffers and loaded code all count against the limit and none of them appear in a heap size figure.
EF Core optimistic concurrency uses a rowversion or concurrency token so a stale update affects zero rows instead of overwriting another user's change. The application must then merge, retry or ask the user.
One exception. WhenAll's task faults with an AggregateException holding every failure, but await rethrows only the first inner exception, so recovering the rest means keeping the WhenAll task in a variable and reading its Exception property.