Aperture
Aperture

Reputation: 2427

For repetitive "SELECT" query, does Linq access databsase each time or it gives you values from its in-memory Entity objects?

By Linq, I mean Entity Framework and Linq. A further question, if the SELECT query is the same, but OEDER BY clause is different, does Linq have to access the database or the in-memory entities have enough information for the new SELECT query with different ORDER BY clause?

Upvotes: 1

Views: 173

Answers (1)

user323446
user323446

Reputation:

The short answer is no, once the Entity is created, the Entity itself contains all the information that will be used for data binding, unless you explicitly instruct the Entity to requery the underlying data store.

Upvotes: 0

Related Questions