For the normal IOptions interface, you can manually build an instance e.g. this SO question. Is there any equivalent way to make an IOptionsMonitor instance wi
In my AspNetCore application, I process messages that arrive from a queue. In order to process a message, I need to resolve some services. Some of those service
I'm playing around with .Net Maui, AppShell and dependency injection. I try to call a page with a constructor which takes the ViewModel of this page as paramete
My use case is running custom code before a controller method by annotating methods. HandlerInterceptor seems the way to go but it seems impossible to inject d
I would like to implement a recurring (timed) IHostedService instance in ASPNET Core that can be stopped and started on demand. My understanding is that IHoste
I would like to implement a recurring (timed) IHostedService instance in ASPNET Core that can be stopped and started on demand. My understanding is that IHoste
I would like to implement a recurring (timed) IHostedService instance in ASPNET Core that can be stopped and started on demand. My understanding is that IHoste
I have the following parts in my gradle file: apply plugin: 'kotlin-kapt' ... compile("org.mapstruct:mapstruct:1.3.0.Final") kapt("org.mapstruct:mapstr
In the angular docs, it lists the types of feature modules that one can implement. One of those being a service module. https://angular.io/guide/module-types
Many Architects and Engineers recommend Dependency Injection and other Inversion of Control patterns as a way to improve the testability of your code. There's n
I'm facing a problem that Mediatr command handler is not called. I have the following solution structure. Project.sln -> Application layer (.NET standard cl
Currently I am using DI in azure functions the standard way public class Startup : FunctionsStartup { public override void Configure(IFunctionsHostBuilder b
Is it possible to create a class under test with FakeItEasy, where all dependencies that are declared in the constructor are initialized automatically with fake
I have a class that I want injected into some controllers. It has a few dependencies that I want to be automatically injected. Specifically this class requires
I created an .NET Core MVC application and use Dependency Injection and Repository Pattern to inject a repository to my controller. However, I am getting an err
From the User's Guide: Sometimes you want to limit the number of times an @Inject-constructed class is instantiated or a @Provides method is called, but y
I have a test class with a constructor that needs an IService. public class ConsumerTests { private readonly IService _service; public ConsumerTests(IS
According to FastAPI official documentation the recommended way to override the dependencies for testing is to do it globally before all tests are run: asy
I'm struggling to register DI NpgsqlConnection() with multiple connection strings in ASP.NET Core 3.1, Dapper v2.0.78 & Postgres v11. I will provide the cur
We are preparing to build a large scale server application. To model the logic effectively we're planning to use DDD, including the tactical p