views:

85

answers:

1

The idea is to use DI container on my service contract implementation to instantiate my Business and Data classes.

The reason I need to do it this way, is that I have one service contract that deals with different client requests. Each client request corresponds to different Business class

A: 

That sounds like a good idea. Implementing custom ServiceHostFactory, ServiceHost and IInstanceProvider does the trick.

Mark Seemann
Forgot to mention the services will be hosted on IIS. Is it still possible to use your suggestion ass is?
Hetal
Yes, follow the link and read all about it. The key is to register the custom ServiceHostFactory in you .svc file.
Mark Seemann