Chapter 9. Contracts

In this chapter:

Contracts Defined 237

WCF Contract Gross Anatomy 238

From Contract Definition to Contract Object 252

Microsoft Windows Communication Foundation (WCF) contracts map Microsoft .NET Framework types to messaging constructs. To illustrate, consider a service that requests, confirms, and cancels restaurant reservations. This service consists of one endpoint located at http://contoso.com/reservations. The endpoint exposes three operations: RequestReservation, ChangeReservation, and CancelReservation. The RequestReservation and ChangeReservation operations use the request/reply Message Exchange Pattern (MEP), and the CancelReservation operation uses the datagram MEP. Some message structures are shared between these operations, ...

Get Inside Windows® Communication Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.