View on GitHub
Clean Architecture Toolkit for .NET
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications.
It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design.

|   HOME   |   MODULE OVERVIEW   |   DEMO   |

Plans for Cat.Dapper

Base query and command handlers for Dapper, including bulk operations.
Status: not started. This plan collects what we know. The open questions need an answer before the build.

Contents

The idea

Entity Framework Core is a good fit for writes and for entity graphs. For a fast read-only overview, for stored procedures and views, and for bulk loads, plain SQL with Dapper is simpler and quicker.

Cat.Dapper gives the same handler style as the other modules, with Dapper underneath. A query handler runs a SQL statement and returns a result. A command handler runs a statement or a bulk operation.

What we already know

From the root readme:

From the demo plan:

From the existing modules:

Decisions and open questions

Decided

Topic Decision
Scope Query and command handlers with Dapper, and bulk operations.
Place in the demo Read-only order overviews, and the Inventory service.
Dependencies The core never references this module.

Open

Questions before building

  1. Is SQL Server the only database for now?
  2. Should Dapper and EF Core be able to share one connection and one transaction?
  3. Where do you want the SQL text to live?
  4. Which bulk operations do you need first: insert, update, delete or merge?
  5. Do we build this before or after the Cat.EFCore handler projects, so the two share a design?
  6. Does the demo order overview query already exist as a need, or do we start with Inventory?
  7. Should the module offer paging helpers for queries?
  8. How do we want to test the SQL: a local SQL Server, a container, or not at all?
  9. Which Dapper version and which extensions, if any, are acceptable as dependencies?
  10. Is there a naming convention for the result classes in DataModels?