Enables LightInject to be used as the service container in ASP.NET Core and Entity Framework 7 applications.
"dependencies": {
"LightInject.Microsoft.DependencyInjection": "<version>"
}
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
{
var container = new ServiceContainer();
return container.CreateServiceProvider(services);
}
public void Configure(IApplicationBuilder app)
{
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello from LightInject");
});
}
}