enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. Dependency injection in ASP.NET Core | Microsoft Learn

    learn.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection

    How to register a service with multiple interfaces in ASP.NET Core DI. By Kirk Larkin, Steve Smith, and Brandon Dahler. ASP.NET Core supports the dependency injection (DI) software design pattern, which is a technique for achieving Inversion of Control (IoC) between classes and their dependencies.

  3. Dependency injection - .NET | Microsoft Learn

    learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection

    Learn how to use dependency injection within your .NET apps. Discover how to registration services, define service lifetimes, and express dependencies in C#.

  4. Dependency injection basics - .NET | Microsoft Learn

    learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-basics

    You learn how to register services and resolve them using dependency injection (DI). This article uses the Microsoft.Extensions.DependencyInjection NuGet package to demonstrate the basics of DI in .NET.

  5. Dependency injection guidelines - .NET | Microsoft Learn

    learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-guidelines

    This article provides general guidelines and best practices for implementing dependency injection in .NET applications. Design services for dependency injection. When designing services for dependency injection: Avoid stateful, static classes and members. Avoid creating global state by designing apps to use singleton services instead.

  6. Use dependency injection - .NET | Microsoft Learn

    learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-usage

    In this tutorial, you learn how to: Create a .NET console app that uses dependency injection. Build and configure a Generic Host. Write several interfaces and corresponding implementations. Use service lifetime and scoping for DI.

  7. Dependency injection into controllers in ASP.NET Core

    learn.microsoft.com/en-us/aspnet/core/mvc/controllers/dependency-injection

    Discover how ASP.NET Core MVC controllers request their dependencies explicitly via their constructors with dependency injection in ASP.NET Core.

  8. Use IHttpClientFactory to implement resilient HTTP requests -...

    learn.microsoft.com/en-us/dotnet/architecture/microservices/implement...

    It's an interface that's used to configure and create HttpClient instances in an app through Dependency Injection (DI). It also provides extensions for Polly-based middleware to take advantage of delegating handlers in HttpClient.

  9. ASP.NET Core fundamentals overview | Microsoft Learn

    learn.microsoft.com/en-us/aspnet/core/fundamentals

    ASP.NET Core includes a built-in dependency injection (DI) framework that makes configured services available throughout an app. For example, a logging component is a service. Code to configure (or register ) services is added to the Startup.ConfigureServices method.

  10. DbContext Lifetime, Configuration, and Initialization - EF Core

    learn.microsoft.com/en-us/ef/core/dbcontext-configuration

    DbContext in dependency injection for ASP.NET Core. In many web applications, each HTTP request corresponds to a single unit-of-work. This makes tying the context lifetime to that of the request a good default for web applications. ASP.NET Core applications are configured using dependency injection. EF Core can be added to this configuration ...

  11. Write custom ASP.NET Core middleware | Microsoft Learn

    learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/write

    Middleware components can resolve their dependencies from dependency injection (DI) through constructor parameters. UseMiddleware can also accept additional parameters directly. Per-request middleware dependencies