2

I can't find the ultimate answer for hexagonal architecture.

The question is in the title.

Should I put the repository interface in the Domain Layer or Application Layer ? Both seems to be correct but what is the main difference ?

1 Answers1

2

This question has nothing to do with hexagonal architecture, but with DDD. And according to DDĎ, the repository interface bekongs to the domain model. As a direct client of the domain, application layer calls the methods on repository interface.

choquero70
  • 4,470
  • 2
  • 28
  • 48