How to use Dependency Injection (DI) in C# Console Application with Logging

Поделиться
HTML-код
  • Опубликовано: 27 дек 2023
  • How to use Dependency Injection (DI) and Logging in C# Console Application.
    Dependency Injection is one of the most useful concepts in any programming language. Dot Net Core has built-in support for DI in a few frameworks example Asp.Net Core. But what if you want to use the Dependency Injection in the C# Console application?
    In this video, We will learn what are the steps to use Dependency Injection in C# Console application from scratch. We will create a service container and register the services by using various methods example: Singleton, Scoped, Transient, KeyedServices, etc.
    Once the DI is set up in the console application we will learn how to enable the logging (Ilogger) in this console application. We will log different messages and display them on the console window.
    #dependencyinjection #logging #console
  • НаукаНаука

Комментарии • 4

  • @nonpuoesserevero
    @nonpuoesserevero 29 дней назад

    Very good video, thanks a lot.

  • @10Totti
    @10Totti 6 месяцев назад +2

    Good Video thanks!

  • @shahabjoon201
    @shahabjoon201 4 месяца назад

    Awesome concept, awesome teaching, awesome teacher.