Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.23 KB

File metadata and controls

21 lines (14 loc) · 1.23 KB

Readme - Code Samples for Chapter 15, Dependency Injection and configuration

Dependency Injection and Configuration gives detail about how the Host class is used to configure a dependency injection container and the built-in options to retrieve configuration information from a .NET application with different configuration providers, including Azure App Configuration and user secrets.

This chapter contains the following code samples:

  • WithDIContainer (with the DI container Microsoft.Extensions.DependencyInjection)
  • WithHost (using the Host class)
  • ServicesLifetime (creating scoped services, disposing of services)
  • DIWithOptions (using the IOptions interface for instantiating services)
  • DIWithConfiguration (using configuration files to configure the services)
  • ConfigurationSample
  • AzureAppConfigWebApp (configuration with Azure App Configuration)

Bash script for Azure App Configuration

For code comments and issues please check Professional C#'s GitHub Repository

Please check my blog csharp.christiannagel.com for additional information for topics covered in the book.

Thank you!