Dependency Injection, Configuration, & Logging in .NET Core
- 31 mins on-demand video
- 1 downloadable resource
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Using dependency injection in .NET Core to add configuration settings, database connections, and logging to a .NET Core application.
- Microsoft .NET Visual Studio, Microsoft SQL Server & Sql Server Management Studio
This is a step-by-step procedure on how to:
use dependency injection
create and use configuration settings
log messages to text files using nLog
provide email notifications using nLog
in a .NET Core application. The course creates a simple application, then uses dependency injection to provide configuration settings and logging in the application. The popular nLog logging framework is used to provide text-based logging and email notifications.
- Experienced programmers learning .NET Core
A brief overview of the course content, including a list of the prerequisites for creating the software application developed during the course.
Shows the different way that configuration settings are maintained in .NET Core application vs a .NET Framework application.
Provides a method for mapping configuration settings to a C# class within the .NET Core application.
After completing this unit, you will be able to maintain configuration settings in a .NET Core application.
Develops a basic database application in .NET Core which can be used to demonstrate dependency injection
After completing this unit, you will have an application in which you can experiment with .NET Core's dependency injection.
Familiarizes you with the method of adding dependency injection to your .NET Core application
Provides a convention for injecting a dependency into classes within the application.
After completing the unit, you will have a basic understanding of the .NET Core dependency injection mechanism, and will be able to inject a dependency into the classes of an application.
Demonstrates a way of running the application in either development or production
Familiarizes you with the use of app settings files
After completing this unit, you will be able to run this small sample application in either a development or production environment, with minor changes, thanks to dependency injection.
Uses dependency injection to provide a custom logging capability using nLog
Provides a simple means of switching between development and production system logging
After completing this unit, you will be able to use nLog to provide custom logging within a .NET Core application.
Introduces the use of nLog to produce email notifications inside the application
Shows you how to configure the email details in the nLog configuration file
After completing this unit, you will be able to use nLog to produce email notifications from inside a .NET Core application.