Chanuka Perera
Chanuka Perera

Reputation: 15

Null values passing on asp.net mvc 5 controller (Ninject DI)

I'm working on a MVC5 application and i'm trying to implement DI on my controller class. I have correctly put binding on Ninjectwebcommons. Still constructor of the controller class is receiving just null implementations.

 public class AdServiceController : Controller
{
    private IClientRequestPackage _clientReqPkg;
    private ISearchAd                 _searchAd;
    private ICreateConnection _createConnection;
    private INewConnectionResult _newConnectionResult;
    private IBuildDataObjects _buildDataObjects;
    private IAdSearchResultObj _adSearchResultObj;



    public AdServiceController (ICreateConnection createConnection)

    {
        _createConnection = createConnection;

    }

This createConnection implementation has a dependency on Iconfigparams. I'm seeing Iconfigparams is just null.

Any help pl.

Chanu

Upvotes: 0

Views: 80

Answers (0)

Related Questions