Here's a very (very!) quick WCF overview I prepared the other day for the team at Zap. It's intended as a soldier's five on the topic; no more and no less.

Service Contracts and Operation Contracts

This is what your WCF service promises faithfully to do for its callers.

image

Data Contracts

These are the data types that your WCF service expects its callers to understand. Thankfully, it will happily explain these data types to its callers.

clip_image002

Events (... or "Duplex Contracts")

Out of scope for this presentation, but see http://msdn.microsoft.com/en-us/library/ms731184.aspx for a pretty decent explanation.

Hosting Your WCF Service

clip_image003

Note the endpoint address:

clip_image004

Adding a service reference to your project

The metadata exchange address is the equivalent of the old Web Service Definition Language (WSDL) address.

clip_image005

Calling the WCF Service

Call it just as you would your local methods.

clip_image006

It's that easy.

Purely for edification, this is what some of the generated code looks like:

clip_image007