-1

Well, I have the following flow in my application:

Controller --> *call* --> UseCase --> *call* --> UpdateCustomerGateway

UpdateCustomerGateway have one method updateCustomer(Customer customer) where Usecase can call database to update the customer.

Looking to this image, my doubt is:

I have a namespace called Entites and another called UseCaseDtos. This last have Request and Response Dto to be used in communication with useCases. But when I call UpdateCustomerGateway* I don't know If I pass the Customer (my entity) or CustomerRequestUseCase (my dto).

Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92

1 Answers1

1

Gateways/repositories usually work with entities. Gateways create entities from data sources and update data sources from entities.

plainionist
  • 2,950
  • 1
  • 15
  • 27