Book Image

WCF Multi-layer Services Development with Entity Framework - Fourth Edition

By : Mike Liu
Book Image

WCF Multi-layer Services Development with Entity Framework - Fourth Edition

By: Mike Liu

Overview of this book

Table of Contents (20 chapters)
WCF Multi-layer Services Development with Entity Framework Fourth Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Hosting the HelloWorld WCF Service
Index

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.