We are refactoring a project where initially its design was only in CRUD, using a very simple architecture that until now has worked. We are starting some Routines, we saw that what we had would not attend us. Some team members have started the studies related to Domain Driven Design and we are applying such practices.
It was decided to use Dapper extensions (insert and update) because we want to have control over SQL queries, since we use SQLServer and RavenDB. For SQLServer we want to use some tools for constructing Query dynamically.
What would be the best way to work with these dynamic queries, ie, parameters, classes, etc. Since you will need to use DTOs.
In which of the projects will be the DTO's classes? repository What are we thinking of doing is good practice and is it valid?