I am developing a small application using EF 4.0 and POCO.
While testing my application, I grew concerned about the performance of the Data Access Layer. So I fired SQL Profiler to see that when trying to retrieve a record:
ctx.Orders.Include("OrderItems").FirstOrDefault<Order>(c => c.OrderID == id);
the EF issues a SQL statement that would retrieve all records from the Orders table on the Server and as such return to DAL at which time L2E would pick one thay meet the criteria and return it.
Can this behaviour be changed.
Thanks!
Zen