文档介绍:©2007 Microsoft Corporation. All rights
reserved.
How to: Define a munication Foundation Service Contract
The first task when creating a basic munication Foundation (WCF) service is to create the contract for the
service that is shared with the outside world that describes how municate with the service. This contract essentially
specifies the collection and structure of messages required to access the operations offered by the service. This is done by
creating an interface that defines the input and output types, and applying the ServiceContractAttribute
[ http://msdn2./en-us/library/ ] to the interface and
OperationContractAttribute [ http://msdn2./en-
us/library/ ] to the methods that you want to expose. For more
information about service contracts, see Designing and Implementing Services [ http://msdn2./en-
us/library/ ] .
Once the interface is created, the next step is to implement the interface. For the procedure that describes this step, see
How to: Implement a munication Foundation Service Contract [ http://msdn2./en-
us/library/ ] .
This topic is one of a series that shows the creation of a simple service and client application. For an overview, see Getting
Started Tutorials [ http://msdn2./en-us/library/