Hi,
I have a query like this:
var
query = p_manager.EntItemSet.Include("p_icon")
.OrderBy(p =>
p.p_friendlyName)
.Where(p =>
p.p_customerID == parent.p_customerID &&
p.p_pointID
== parent.p_pointID &&
p.p_groupID
== parent.p_groupID &&
p.p_deviceItem.p_visible > 0);
What I have noticed is that because of the last where criteria "p.p_deviceItem.p_visible > 0" , the Entity items for "p.p_deviceItem" are loaded too from the database and put into the Entity Cash on the client.
It looks like this last where criteria is performed in the Entity Model but not in the Database Engine that would of course be faster and eliminate loading the p_deviceItem Entities from the database.
Why is this such? Can this be avoided?