Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Last active February 20, 2016 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/63c1bc167d3566148611 to your computer and use it in GitHub Desktop.
Save justinyoo/63c1bc167d3566148611 to your computer and use it in GitHub Desktop.
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