I'm working with entity framework with POCO objects and I've got LazyLoading turned on.
If i'm working with a collection associated with an object, when is the collection fully loaded and in what circumstances?
If I call each of these
Order.OrderItems.Count()
Order.OrderItems.Any(x => x.StatusId = aValue)
Order.OrderItems.All(x => x.StatusId = aValue)
Do any of these guarantee the complete loading of the OrderItems collection? At points in the code we are calling
Order.Include(“OrderItems”)
when querying or
context.LoadProperty(order, “OrderItems”)
after querying
But I’ve realised sometimes this isn’t always happening – and I want to know the consequences of this not occurring. I think I’ve got a bit of a knowledge gap with it