How it works

The library implements a custom IInstanceProvider implementation, which uses the Common Service Locator to get a reference to an Inversion of Control container. The container is then queried for an instance of the requested service type. The instance provider
is dynamically injected as an endpoint behavior to all of the endpoints with a matching service contract.

In the .svc file, add the Factory attribute and provide the Assembly-Qualified Name of on of the factories that are available (ServiceHostFactory for SOAP services and
WebServiceHostFactory for RESTful services) in the Common Service Factory library

Configure your IoC and setup the Common Service Adapter

Enjoy using loosely coupled dependencies in your WCF services using the IoC container you prefer1

1 There needs to be an adapter for the Common Service Locator available for the IoC container that you are using in order for it to work with the Common Service Factory library. If there isn't one available, then you should contact the author(s)
of the IoC container and ask them to implement one

Related Projects

Common Service Locator, needed to configure an IoC container adapter that is going to be used by the factories