O'Reilly logo

WCF 4.5 Multi-Layer Services Development with Entity Framework by Mike Liu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Adding Database Support and Exception Handling

In the previous chapter we created a WCF service with two layers. We didn't add the third layer, that is, the data access layer. Therefore, all of the service operations just returned a fake result from the business logic layer.

In this chapter we will add the third layer to the WCF service. We will also introduce fault contracts for service error handling.

We will accomplish the following tasks in this chapter:

  • Creating the data access layer project
  • Modifying the business logic layer to call the data access layer
  • Preparing the Northwind database for the service
  • Connecting the WCF service to the Northwind database
  • Testing the service with the data access layer
  • Adding a fault contract to the service ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required