I often see navigation properties described in tutorials as
Is this a condition that Entity Framework must meet? Could I utilize
What is the primary goal of utilizing
in place of
What you choose will often rely on the approaches you need. generally -
For a list of items that merely has to be iterated over, see (MSDN: http://msdn.microsoft.com/en-us/library/system.collections.ienumerable.aspx).
For a list of items that need to be updated iteratively, see (MSDN: http://msdn.microsoft.com/en-us/library/92t2ye13.aspx).
if a list of items has to be updated, sorted, iterated over, etc (See here for a full list: http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx).
More specifically, when selecting the type, slow loading is a factor. Entity Framework's navigation properties are proxies by default and provide change tracking. The virtual type must implements the navigation property creation for the dynamic proxy.
A navigation property that represents the "many" end of a relationship must return a type that implements ICollection, where T is the type of the object at the other end of the relationship. -Requirements for Creating POCO ProxiesMSDN
is employed due to the
interface does not provide a mechanism to add, remove, or change the collection in any other manner.