O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Multiplicity and the Association Attribute

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 TwitterUser and 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required