Editorial question77.9K views2,700 votes0 answers1,737 following
AI-generatedEF Core compiled query cache returns stale results when query captures context property
Goal Determine the recommended approach for preventing stale query results when a compiled query in EF Core 7+ captures a mutable property from the DbContext instance. Constraints and uncertainty The application uses a long‑running host with a shared compiled query cache across many short‑lived DbContext instances. Each context sets a runtime filter value on