views:

9

answers:

0

Say I have CompaniesController which uses a CompaniesService. And the Companies Service is where I do all my Business Validation so it requires I pass it the ModelState (Im using a ModelState Wrapper following this... But since I added Ninject to my project I cant figure out how to inject the ModelStateWrapper into the CompaniesService... please help

public class CompaniesService : ICompaniesService
    {
        private ICompanyRepository _repository;
        private IValidationDictionary _validatonDictionary;


        public CompaniesService(ICompanyRepository> r,IValidationDictionar v)
        {
            _repository = r;
            _validationDictionary = v
        }

Right now Im getting

Error activating IValidationDictionary No matching bindings are available, and the type is not self-bindable.

But I cant figure out how to bind it!.. help please