WCF, Ninject and REST

On my current project, we’re using WCF and RESTful services to provide data to a Silverlight application. We have our own IOC/DI framework but we’re also toying with Ninject in that capacity and it was my job this week to hook it up to the service layer. I came across Heinrich’s description of the process but it needs a little tweak to work with RESTful services. Instead of having your NinjectServiceHost class derive from ServiceHost, use WebServiceHost instead. Once that’s done, Ninject works like a champ.

Leave a Reply

Your email address will not be published. Required fields are marked *