Closed RustamGulamov closed 3 years ago
Hello RustamGulamov,
No, not really - in hexagonal architecture terms, IRepository would be just a port used in your application layer (i.e. in the command handler), not a layer of its own. I suggest reading up some articles on hexagonal or onion architecture with DDD, e.g.
Best regards, Martin
Structure of my project: Airline.WebApi, Airline.Domain, Airline.Infrastructure. I want to create project Airline.Application for domainService/commandHandler. But Infrastructure is one level up then Airline.Application, right ?
Do I understand correctly, сommandHandler should be in Airline.WebApi ?
I am not entirely sure what Airline.Infrastructure contains in your case, but I'd suggest a setup similar to this:
Why interface IRepository in Revo.Infrastructure ? this is contrary to hexagonal or n-layered architecture. The Application layer should not depend from Infrastructure