-
-
Save csharpfritz/647618cc7ce75a639feb0e0dd5ddfc41 to your computer and use it in GitHub Desktop.
ASP.NET Core Dependency Injection
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 IConfigurationRoot Configuration { get; } | |
// This method gets called by the runtime. Use this method to add services to the container. | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
// Add framework services. | |
services.AddMvc(); | |
services.AddSingleton(Configuration); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment