Amitpnk / Hexagonal-architecture-ASP.NET-Core

App generator API solution template which is built on Hexagnonal Architecture with all essential feature using .NET Core
75 stars 26 forks source link

This is not hexagonal architecture #2

Open MyEidos opened 2 years ago

MyEidos commented 2 years ago

The current project doesn't satisfy the requirements of hexagonal architecture. Ex: concrete (!) EF DB context (!) is used on the domain layer: public DealDomain(ApplicationDbContext dbContext)

Which creates strong coupling with DB layer.

Innokmm commented 2 years ago

I agree, the first thing I've noticed in the Domain layer is a reference to Persistence, which as per comment from MyEidos ends up as dependency to the EF:

image

Shouldn't Persistence depend on Domain layer?