I've added FrameLog to my MVC EF6 code first project and am getting an error when running it:
Error activating ILoggingFilterProvider using conditional implicit self-binding of ILoggingFilterProvider
Provider returned null.
Activation path:
4) Injection of dependency ILoggingFilterProvider into parameter filterProvider of constructor of type GGContext
3) Injection of dependency GGContext into parameter context of constructor of type TillService
2) Injection of dependency ITillService into parameter tillService of constructor of type BankingController
Everything is set up as per the guide & my context now has filterProvider parameter:
public class GGContext : DbContext
{
public GGContext(ILoggingFilterProvider filterProvider = null)
: base("name=myconnn")
{
Logger = new FrameLogModule<ChangeSet, Employee>(new ChangeSetFactory(), FrameLogContext, filterProvider);
....
I assume that the error has something to do with injecting the context into the constructor in the service class:
private readonly GGContext _context;
public TillService(GGContext context)
{
_context = context;
}
What do I need to change to fix it?
UPDATE
Based on the accepted answer, I concluded that FrameLog was overkill for my needs and required more changes than I am prepared to make. So while the answer wasn't a direct fix for the problem, it made me realise I needed a different solution.
I implemented solution using the ChangeTracker property in EF, as described in this answer by @VAAA