Offshore your .NET/SQL Development to Latin America! Languages: en-de-es
Both examples use the AdventureWorks DB on SQL Server 2008 and the Entity Framework 4.0
In the first case the query is armed in line 23, but not materialized.
In line 27 result is “Bothell” (see watch on the right side)
Then there is done an update in line 32.
In line 35 the result is Berlin.
This shows clearly, that the execution of the query is deferred to the moment of enlisting.
In this case in the formulation of the query the result is materialized by calling the extension .ToList() in line 43.
Result in line 47 gives back “Bothell” as like Result2 in line 55, despite of having changed the address to Berlin in the meantime!