autofac / Autofac.Owin

OWIN integration for Autofac
MIT License
23 stars 15 forks source link

Autofac.Owin

ASP.NET OWIN integration for Autofac.

Build status

Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.

Quick Start

To take advantage of Autofac in your OWIN pipeline:

public class Startup
{
  public void Configuration(IAppBuilder app)
  {
    var builder = new ContainerBuilder();
    // Register dependencies, then...
    var container = builder.Build();

    // Register the Autofac middleware FIRST. This also adds
    // Autofac-injected middleware registered with the container.
    app.UseAutofacMiddleware(container);

    // ...then register your other middleware not registered
    // with Autofac.
  }
}

Check out the Autofac OWIN integration documentation for more information.

Get Help

Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.