When using Webapi/Rest as Adapter (Adapter is infrastructure implementation layer of Hexagonal architecture/port and adapters), is that adapter can reach to domain objects? I use Command-CommandHandler at write and Query-QueryHandler at read side
- Commands can include Domain Objects? or only primitive objects?
- Queries can include Domain objects? or only primitive objects?
If query/command cannot include domain objects, each query handler will convert and validate primitive objects to domain objects, this cause redundant code. (DRY)
On the other hand; if query/commands can include domain objects that will cause serialization issue and code sharing between psyhical bounded context (or microservices)