I have DTO called FooDTO that is sent to or from the FooController. I also have a mapper class that maps FooDTO to my domain entity Foo. To keep my controllers slim, I am using the Mediatr to implement CQRS. Should the Handler for Foo be responsible for calling the mapping function? Or should this happen elsewhere such as a layer in the pipeline before it?
Aucun commentaire:
Enregistrer un commentaire