1

Im trying to add Ninject to my app so that (maybe) I can try creating/running tests in it... so I need a little help setting this up

here's my controller

    public class CompaniesController : Controller
            {
                private ICompaniesServices _service;

                public CompaniesController()
                {
                    _service = new CompaniesServices(new ModelStateWrapper(this.ModelState));
                }

    ......

}

So, how can I change this to make it Ninject like??

also I need to do something like this in the Module I assume?

public override void Load()
        {
            Bind<ICompaniesServices>().To<CompaniesServices>();
        }

1 Answer 1

1

This post looks like what your after: http://www.kevinrohrbaugh.com/blog/2009/8/7/using-ninject-2-with-aspnet-mvc.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.