Create a REST layer for your WCF application

WCF is pretty awesome, apart from the fact you can run it as a  windows service, in the event you would like to create REST IIS layer it is pretty simple process.

Now to ensure we keep our loose coupling intact between the WCF interface and the REST layer itself we do this by simply slotting in a .svc file from file and tweaking the routes.

As follows:

Have your WCF service contract interface: 

Now the trick now is to add annotation to get the web stuff to work:

Put this on your concrete method:

Hack your .svc file so that the code behind is pointing to your Concrete implementation class:

Now to create a restful route ensure you use a differ service factory, as going to the .svc will be purely web: