AtomikD3sign
AtomikD3sign

Reputation: 23

Hexagonal Architecture - Should I put repository interface in the Domain Layer or Application Layer

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 ?

Upvotes: 2

Views: 739

Answers (1)

choquero70
choquero70

Reputation: 4754

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.

Upvotes: 2

Related Questions