Chapter 21Databases Code Downloads for this Chapter

The code downloads for this chapter are found at 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.

Using Databases

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 ...

Get Beginning C# 6.0 Programming with Visual Studio 2015 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.