About 4,930,000 results
Open links in new tab
  1. c# - MediatR when and why I should use it? - Stack Overflow

    Jun 3, 2018 · Why you might use it MediatR simplifies communication between components in a .NET application, often aiding in implementing the CQRS (Command Query Responsibility Segregation) …

  2. c# - MediatR with ASP.NET Core DI - Stack Overflow

    Feb 15, 2016 · For earlier Mediatr versions up to and including 11.x: In July 2016, Jimmy Bogard, author of MediatR, had released a package to register MediatR, and Handlers, with the ASP.Net Core DI …

  3. Not sure I need MediatR : r/dotnet - Reddit

    Apr 16, 2024 · MediatR is just trading "clean" and aesthetic code for indirection. Definitely, but from my experience it also greatly helps reduce the amount of mocking required for writing unit tests, and …

  4. I heard a claim that MediatR is not recommend for enterprise ... - Reddit

    I love MediatR. I have been using it for most my projects. These projects are not very huge and I have had no performance impacts which I have noticed from using MediatR. I heard that MediatR is not …

  5. Benefit of using MediatR vs directly using Service

    Aug 10, 2022 · MediatR is a .NET implementation of the mediator pattern, allowing you to ensure this behavior is followed in your application. But, it can also help with facilitating other patterns, such a …

  6. How does MediatR know which handler to call? - Stack Overflow

    Sep 5, 2022 · MediatR makes heavy use of generic types in order for its mechanism to work. As you probably noticed from using it, you are required to use certain interfaces in the right way in order for …

  7. Replacing service layer with MediatR - is it worth to do it?

    MediatR requires the IRequest and IRequestHandler interfaces to be implemented. This allows MediatR to scan your assemblies and add the handlers to your service collection at startup. MediatR gets the …

  8. c# - Adding MediatR service - Stack Overflow

    Mar 4, 2023 · I want to add MediatR to my services. Here is the code: public class Program { public static async Task Main(string[] args) { var builder = WebApplication.CreateBuilder(args); bui...

  9. c# - MediatR generic handlers - Stack Overflow

    Sep 18, 2022 · I use a MediatR library in my Asp .Net core 6 app. And I have a the same logic for a group of requests, so I want to use the same handler for all of them. The problem is not new, but the …

  10. c# - MediatR publish and MediatR send - Stack Overflow

    Jul 31, 2020 · mediatR.Publish This example deviates more from how MediatR works internally, because MediatR collects all INotificationHandlers via assembly scanning. With IGet you can also …