The requested page is not available for the requested platform. You are viewing the content for Default platform.

Collection Properties in Entity Framework

The example below illustrates how to implement Collection Properties in an Entity Framework Code First class.

public virtual IList<AssociatedObject> Association { get; set; }
public virtual IList<AggregatedObject> AggregatedAssociation { get; set; }

Note that the collection properties should be declared as virtual in EF.