, app.UseServices, -. - , webapi MVC, .
. , DI , - (OWIN vNext), SimpleInjector
public static void UseInjector(this IAppBuilder app, Container container)
{
app.Use(async (context, next) =>
{
using (var scope = container.BeginExecutionContextScope())
{
await next.Invoke();
}
});
}