Last active
February 20, 2016 12:29
-
-
Save justinyoo/63c1bc167d3566148611 to your computer and use it in GitHub Desktop.
ASP.NET Core Tips & Tricks
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 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