Created
June 18, 2018 09:33
-
-
Save m-malkowski/5bb6f2d55c1c7d2bef7011716c35f98d to your computer and use it in GitHub Desktop.
Working with built-in dependency injection of ASP .NET Core - Final Startup
This file contains hidden or 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 void ConfigureServices(IServiceCollection services) | |
| { | |
| services.AddDbContext<ApplicationDbContext>(options => | |
| options.UseInMemoryDatabase() | |
| ); | |
| // Add framework services. | |
| services.AddMvc(); | |
| // Register application services. | |
| services.AddInjectionByAttribute(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment