I use ninject framework. In my code I have a Lazy object. I can create an instance, but when I call the value property I got an exception.
private La
Use the factory extension for Ninject https://github.com/ninject/ninject.extensions.factory
You need a default public constructor on Lazy :
public Lazy() {}
Bind(typeof (Lazy<IPsoriasisReportUserControl>)).ToMethod(
ctx => new Lazy<IPsoriasisReportUserControl>(() =>
Kernel.Get<IPsoriasisReportUserControl>()));