TwitterUser Class

The TwitterUser class contains various properties, such as the screen name of the Twitter user. It also includes a collection of TimelineItem objects that are maintained using an EntitySet. An EntitySet provides for deferred loading and manages the relationship of the collection side of one-to-many relationships between entities.

The TwitterUser constructor initializes the EntitySet, specifying two handlers: one that is called when a TimelineItem is added to its collection; the other when a TimelineItem is removed (see Listing 29.2).

The TwitterUser class also uses the Index attribute, which tells the DataContext to create a database index for the secondary column ScreenName.

Indexes improve the speed of data retrieval operations ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.