Should you use the Repository Pattern? With CQRS, Yes and No!

This page summarizes the projects mentioned and recommended in the original post on /r/dotnet

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • MockQueryable

    Mocking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc

  • The repository proponents are mostly trying to reduce the interface you need to mock in order to test your business logic, especially with unit testing, not integration testing. If you're just depending on the db context, (and you're mocking with the really awesome MockQueryable library) the tester needs to know exactly which parts of the db context are being used. This is not how unit testing should work. When writing unit tests, you shouldn't have to know that much about the internal behaviour of the thing you are trying to mock.

  • Rx.NET

    The Reactive Extensions for .NET

  • RX vs classic Events, do you have a preference? I have looked at RX very closely often. Its cool, but takes some getting used to, so I tent to stick with classic events for both ease on myself and other developers. Do you have a preference between RX and classic Event Args?

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts