One-to-many entity relationships can be defined by decorating entity properties with
Association attributes. Two entities participating in a one-to-many relationship with each other each use properties of the
Association attribute to indicate on which side each resides.
One-to-many entity relationships are represented as foreign key relationships in the database.
The one-to-many relationship between
TimelineItem is defined with an
Association attribute placed on the
TwitterUser property of the
TimelineItem class. The attribute declares that the
TwitterUserId column of the
TimelineItem table is a foreign key of the
TwitterUser table. It also declares that the user field holds a reference ...