Microsoft Extensions Logging with ASP.NET MVC 4 Web app and dependency injection

101 Views Asked by At

We have an ASP.NET MVC 4 web app and I am trying to add Microsoft Extension logging using dependency injection methodology but unable to do.

Here is my BaseController where I am trying to initiate ILoggerFactory property which I wish to use across all controllers as they inherits from BaseController. I am not sure if this is right way in ASP.NET MVC because I am able to do in .NET Core.

enter image description here

0

There are 0 best solutions below