Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I configure Ninject so it injects an instance in a view model?

PS. It is an abstracted service to help with validation, so I am not trying to burden the model with too much responsibilities.

share|improve this question
up vote 1 down vote accepted

Refer to this SO question -, which points to this link -

I also had the same issue. For that I extended my NinjectControllerFactory class to provide me with an instance of the required dependency. I blogged about this here -

I may have to look in to the link from the SO post too and see if that's a better alternative.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.