I have a query:
db.Order.Include("OrderItem").First(r => r.Id == OrderId)
First()
and FirstOrDefault()
are executed immediately (eager) at the point where they're called.
All standard LINQ operators, which return a single, non-enumerable result, and those that do not return an explicit IEnumerable<T>
, are executed immediately.
See Classification of Standard Query Operators by Manner of Execution for the complete list of LINQ operators.