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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access