Guessing: Most likely the factory isn't created by Ninject But as you shouldn't use the Singleton pattern anyway when doing Dependency Injection this should be easy to solve Pass IUserService to the constructor of any object that needs to know it Bind it as Singleton kernel.Bind().To(). InSingletonScope().
Guessing: Most likely the factory isn't created by Ninject. But as you shouldn't use the Singleton pattern anyway when doing Dependency Injection this should be easy to solve. Pass IUserService to the constructor of any object that needs to know it.
Bind it as Singleton kernel.Bind().To(). InSingletonScope().
Well I switched to doing this link shahnawazk. Com/2010/12/… and still I am getting a null. The kernel setup gets hit.
Also I maybe have multiple services on one controller and would hate to have 5 or 6 parameters inside that. I would rather do property injection. – Mike Flynn Jun 21 at 17:36 I'm a little bit confused.
That link does nowhere recommend to use the singleton pattern. Also, if you have to many dependencies on your constructor that is most likely not a problem of constructor injecion but rather that you do not follow the single responsibility principle correctly. – Remo Gloor Jun 21 at 17:46 Furthermore I succest to use github.Com/ninject/ninject.web.
Mvc/wiki/MVC3 as MVC bootstrapper for Ninject – Remo Gloor Jun 21 at 17:47 I figured it out by adding a constructor with IUserService as a parameter and it worked. I will go with the direction of single responsibility principle. – Mike Flynn Jun 21 at 17:53.
Guessing: Most likely the factory isn't created by Ninject.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.