This project is read-only.

Using Lambda Container with Web API

If you are using owin, please look here in stead: OWIN Integration
The web api integration package enables dependencies to be injected by Lambda Container.
This means that any dependencies specified in an API Controller's ctor arguments will be resolved through the Lambda Container.

Configuration example in C#
var httpConfiguration = new HttpConfiguration();

//The rest of the startup class

The first extension method .ConfigureForWebApi() is called to change the directory hive to the standard "\bin" folder used for application assemblies in Web API.

The Lambda Container will be fully operational after the bootstrapper has been executed but it is not until the second extension is called .EnableAsWebApiDependencyResolver(httpConfiguration) that Web API will begin to use it as it's dependency resolver.

Last edited Apr 22, 2016 at 8:16 AM by Remboel, version 6