Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ASP.NET Core Tips & Tricks
public class Startup
{
...
public IServiceProvider ConfigureServices(IServiceCollection services)
{
...
var builder = new ContainerBuilder();
builder.RegisterType<ValueService>().As<IValueService>();
builder.Populate(services);
var container = builder.Build();
return container.Resolve<IServiceProvider>();
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment