How to do dependency injection inside ASP.NET MVC's RegisterGlobalFilters method
问题 I am still a bit new to using IOC containers and I'm struggling a bit. I am using ASP.NET MVC 5.2 with Ninject.MVC3. I have an exception filter that basically hands off to a log service: public class ExceptionLoggerFilter : IExceptionFilter { private readonly ILogService _logService; public ExceptionLoggerFilter(ILogService logService) { _logService = logService; } public void OnException(ExceptionContext filterContext) { _logService.LogError(filterContext.Exception); } } I would like to use