Where can i find ninjectKernel?
I am using ninject 2.2
public ISession Session
{
get { return ninjectKernel.Get<ISession>(); }
}
Edit:
I created a service locator to get my kernel from anywhere.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You provided a code for a property (Session) of some class. This code features a get accessors that uses ninjectKernel field. Most likely you can find this field in the enclosing class.
Usually it’s defined like this:
Where Module1, Module2, etc are the modules that define your bindings.