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

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

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