Summary
In this chapter, we have added the third layer—the data access layer—to RealNorthwindService
. We have also added exception handling to the service. The key points covered in this chapter include:
Database connection strings should be stored in configuration files, not in C# code
The data access layer should contain the code to access the underlying databases, it should not contain business logic
If service contracts have been changed, the client has to update the reference to the service
You should throw fault contracts instead of exceptions to the client from WCF services
A handled fault exception won't make a communication channel invalid, but an exception will