Database Reference
In-Depth Information
listBox1.Items.Add(cont.FirstName);
}
}
Again, this topic isn't focused on the Entity Framework, but here's a quick explanation of what this
code does (you use the Entity Framework in a couple more places in this topic). The first line creates an
instance of the EFAzureEntities class. This class lets you work with database objects in terms of .NET
object-oriented objects. You then use the Language Integrated Query (LINQ) language technology (in
this case, LINQ to Entities) to query the Contact table and fill the list box with the first names of all the
contacts, as shown in Figure 3-18.
Figure 3-18. Completed Form With Data From SQL Azure.
And there you have it; you've successfully queried the cloud. Yes, this is a simple example, but its
purpose is to illustrate how easy it is to connect to SQL Azure, create and populate a database, and create
an application that queries the database.
Conclusion
This chapter walked through a brief introduction to creating and configuring you Azure account. You
learned how to maintain and administer your SQL Azure Portal, from creating databases to maintaining
security via the built-in firewall settings that allow you to specify who can connect to those databases.
Search WWH ::




Custom Search