Chapter 7. LINQ to Entities – Basic Concepts and Features
In the previous chapters, we learned how to create a three-layer WCF service. In this and the following chapters, we will learn how to use LINQ to query a database, or in other words, how to use LINQ to Entities in C#. After reading these two chapters, we will have a good understanding of LINQ to Entities so that we can rewrite the data access layer of our WCF service with LINQ to Entities to securely and reliably communicate with the underlying database.
In this chapter, we will cover the following topics:
- LINQ to Entities
- Creating a LINQ to Entities test application
- Creating the data model
- Querying and updating a database table
- Viewing generated SQL statements
- Deferred execution
- Deferred loading versus eager loading
- Joining two tables
- Querying a view
In the next chapter, we will cover the advanced concepts and features of LINQ to Entities such as stored procedure support, simultaneous updating, and transaction processing...