I try to inject log4net in a ILogger property of my service class but the property is always NULL!
I\'ve seen this topic but it doesn\'t help me!
How can I g
A problem is where you are checking it:
public ILogger Logger
{
get { return logger; }
set { logger = value; }
}
public LogicClass1()
{
logger.Debug("Here logger is NullLogger!");
}
The property injection will not happen until after the constructor is run, so checking the property value in the constructor will never show the value you are expecting