WCF applications
In this section, we will implement the Northwind customers scenario using Windows Communication Foundation (WCF). WCF is a highly customizable and extensible framework, and it is possible to configure it to use Ninject service host factories to enable hosting of injectable services. Ninject WCF extensions include all the necessary components.
Now, add a new WCF service application to the Northwind solution, and reference Northwind.Core
project. We also need to add reference to the
Ninject.Extensions.WCF
, Ninject.Web.Common
, and Ninject
libraries. We can do it either via NuGet, or we can download the binaries from the Ninject page on GitHub
. Adding binary references manually requires some manipulations of the Global.asax
file in our application. We talked about this approach in the last section. However, adding a reference to Ninject.Extensions.WCF
via NuGet will also add other references to the required Ninject packages, and will create the NinjectWebCommon
class in the...