문제

I have been writing MVC apps using what I call the Service-Repository-UnitOfWork pattern, which looks like this:

MVC Controllers --> Services --> Repositories --> EntityFramework

and then

Repositories/EntityFramework (constructs Domain Objects/POCO) --> Services --> Transform to ViewModels --> Controller --> Send the ViewModel/View to the client.

I use a IoC Container to configure the Interfaces for the services, repositories and UnitOfWork, that are injected into the constructors of the various components.

My question is, does this resemble the Onion Architecture at all?

Does that make any sense?

도움이 되었습니까?

해결책

No, it's not. Those are patterns from different categories.

Onion architecture governs entire solution, it is the same level as "multilayer" or "SOA" or "client-server".

"Service layer", "Repository", "UoW" represent implementation patterns, they govern specific parts inside you application.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top