I'm unsure of how to fix my current situation. I'm attempting to create a task:

public class whatever
{
    [Dependency]
    public IReportingBL ReportingBL { get; set; }

    public Task GetStuff()
    {
        return _taskFactory.StartNew(() =>
        {
            return ReportingBL.Method1;
        });
    }
}

ReportingBL doesn't get resolved. If I create a new instance of ReportingBL inside the thread then the layers below it don't get resolved.

How do I go about getting unity to work in this situation?

Related posts

Recent Viewed