Using domain entities as the input or output model
If we have an Account domain entity and an incoming port, SendMoneyUseCase, we might be tempted to use the entity as the input and/or output model of the incoming port, as Figure 11.2 shows.
Figure 11.2 – Using a domain entity as the input or output model of a use case couples the domain entity to the use case
The incoming port has a dependency on the domain entity. The consequence of this is that we’ve added another reason for the Account entity to change.
Wait, the Account entity doesn’t have a dependency on the SendMoneyUseCase incoming port (it’s the other way around), so how can the incoming port be a reason to change for the entity?
Say we need some information about an account in the use case that is not currently available in the Account entity. This information is ultimately not to be stored in the Account entity, however, but in a different domain or bounded...