Created
April 11, 2021 20:37
-
-
Save StacyGay/e29e2057da7005860e2dcd1164c1cf43 to your computer and use it in GitHub Desktop.
Unity DI VNext Startup 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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