Database Reference
In-Depth Information
infoLabel.Text = string.Concat("Desc: ", docInfo.Descr, " ", "Price: ",
docInfo.PurchasePrice.ToString());
authorList.SelectedIndex = docInfo.AuthorId;
Running the Application
You're ready to run your application! Make sure that the Web Role project is the startup project by
right clicking the Web Role project and selecting Set as Startup Project from the context menu. Go ahead
and press F5 to build and run the project. When the web page in Figure 6-15 comes up, the list box will
be populated with the list of documents from the Docs table. Scroll through the list and select a
document which will then populate the label with the appropriate description and price, as well as select
the associated author in the combo box.
Figure 6-15. Running Application
Congratulations, you've successfully built a WCF Data Service that connects to, and queries, a SQL
Azure database. While this was a fairly simple example, it should be enough to provide you with a solid
foundation on which to start building and architecting data services for the cloud.
Search WWH ::




Custom Search