Skip to content

Instantly share code, notes, and snippets.

@StacyGay
Created April 11, 2021 20:37
Show Gist options
  • Save StacyGay/e29e2057da7005860e2dcd1164c1cf43 to your computer and use it in GitHub Desktop.
Save StacyGay/e29e2057da7005860e2dcd1164c1cf43 to your computer and use it in GitHub Desktop.
Unity DI VNext Startup 3
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddMvc();
var container = new UnityContainer();
container.Populate(services);
container.Resolve<IScopedInstance<ActionContext>>();
return container.Resolve<IServiceProvider>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment