Wrox.com Code Downloads for this Chapter
wrox.com code downloads for this chapter are found at
www.wrox.com/go/beginningvisualc#2015programming on the Download Code tab. The code is in the Chapter 21 download and individually named according to the names throughout the chapter.
The previous chapter introduced LINQ (Language-Integrated Query) and showed how LINQ works with objects and XML. This chapter teaches you how to store your objects in a database and use LINQ to query the data.
A database is a persistent, structured storehouse for data. There are many different kinds of databases, but the most common type you will encounter for storing and querying business data is relational databases such as Microsoft SQL Server and Oracle. Relational databases use the SQL database language (SQL stands for Structured Query Language) to query and manipulate their data. Traditionally, working with such a database required knowing at least some SQL, either embedding SQL statements in your programming language or passing strings containing SQL statements to API calls or methods in a SQL-oriented database class library.
Sounds complicated, doesn't it? Well, the good news is that with Visual C# 2015 you can use a Code First ...