Summary
In this chapter, we have used LINQ to Entities to communicate with the database in the data access layer rather than use the raw ADO.NET APIs. We have used only one LINQ statement to retrieve product information from the database and, as you have seen, the updates with LINQ to Entities prove to be much easier than with the raw ADO.NET data adapters. Now, WCF and LINQ are combined together for our services so we can take advantage of both technologies.
The key points covered in this chapter include:
The data access layer can be modeled with the LINQ to Entities designer.
Business entity classes are all located inside the LINQ to Entities designer file within the data access layer.
It is better to separate our own entities classes from the generated entities classes so we can decouple the data access layer from the service interface layer.
Client applications still communicate with the service by exchanging messages. The LINQ to Entities objects are not exposed to clients and the technology...