15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1390 ❘ ChaPTer 47 syndicAtiOn<br />

The DockPanel named content contains a Frame element that binds the Source property to the first link of an<br />

item. With that setting, the Frame control uses the web browser control to display the content from the link:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

URL:<br />

http://blogs.thinktecture.com/cnagel/rss.aspx<br />

<br />

Get Feed<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

code snippet SyndicationReader/SyndicationReader.xaml<br />

offering syndiCaTion feeds samPle<br />

Reading syndication feeds is one scenario in which<br />

the Syndication API can be used. Another is to offer a<br />

syndication feed to RSS <strong>and</strong> Atom clients.<br />

For this, Visual Studio 2010 offers the Syndication Service<br />

Library template, which you can use to start with. This<br />

template defines a reference to the System.ServiceModel<br />

library, <strong>and</strong> adds an application configuration file to define<br />

a WCF endpoint.<br />

To offer data for the syndication feed, the ADO.<strong>NET</strong><br />

Entity Framework is helpful. In the sample application,<br />

the Formula-1 database is used, which you can download<br />

from the Wrox web site at www.wrox.com with the sample<br />

applications for the book. The ADO.<strong>NET</strong> Entity Data<br />

Model item with the name Formula1Model.edmx is<br />

added to the project. Here, the tables Racers, RaceResults,<br />

Races, <strong>and</strong> Circuits are mapped to entity classes Racer,<br />

RaceResult, Race, <strong>and</strong> Circuit, as shown in Figure 47-3. figure 47-3<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!