79431186

Date: 2025-02-11 20:05:42
Score: 1
Natty:
Report link

quote from https://learn.microsoft.com/en-us/ef/core/performance/advanced-performance-topics?tabs=with-di%2Cexpression-api-with-constant

When EF receives a LINQ query tree for execution, it must first "compile" that tree, e.g. produce SQL from it. Because this task is a heavy process, EF caches queries by the query tree shape, so that queries with the same structure reuse internally-cached compilation outputs. This caching ensures that executing the same LINQ query multiple times is very fast, even if parameter values differ.

So, in short, yes.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: LegacyDev