Ninjecting into App_Start classes and static classes

Let’s say you are doing some work on your AuthConfig class, in your Global.asax, or maybe a static class. You can’t property-inject, and generally it’s a pain to get this to work. However, if you’re using Ninject for ASP.NET MVC, you can use the following call: var myInjectedService = DependencyResolver.Current.GetService<IMyInjectedService>(); The performance impact of this…