Dependency Injection, Configuration, & Logging in .NET Core
3.3 (5 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
39 students enrolled

Dependency Injection, Configuration, & Logging in .NET Core

Using Dependency Injection, Configuration Settings, and Logging in .NET Core
3.3 (5 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
39 students enrolled
Created by Tim Gulstine
Last updated 5/2019
English
English [Auto]
Current price: $13.99 Original price: $19.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 31 mins on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Using dependency injection in .NET Core to add configuration settings, database connections, and logging to a .NET Core application.
Requirements
  • Microsoft .NET Visual Studio, Microsoft SQL Server & Sql Server Management Studio
Description

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.

Who this course is for:
  • Experienced programmers learning .NET Core
Course content
Expand 8 lectures 30:44
+ Using Dependency Injection in .NET Core
8 lectures 30:44

A brief overview of the course content, including a list of the prerequisites for creating the software application developed during the course.

Preview 00:29

This unit:

  • 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.

Preview 04:12

This unit:

  • 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.

Creating a Simple Database Application for a Dependency Injection Example
04:24

This unit:

  • 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.

Preview 06:51

This unit:

  • 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.

Using Dependency Injection to Support Multiple Environments
02:41

This unit:

  • Familiarizes you with the configuration settings file called launchsettings.json

After completing this unit, you will be able to use the launch settings file to configure environmental variables at application startup.

Using Launch Settings With Dependency Injection
02:38

This unit:

  • 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.

Using Dependency Injection to Add Logging to the .NET Core Application
06:22

This unit:

  • 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.

Using Dependency Injection to Add Email Logging to Application Classes
03:07