Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Layers and Contracts

What is the prefered communication: IAggregationRoot marker is stored in Domain Layer and Data Access Layer references it in IRepository contract or vice versa?

EDIT

I looked at Tim Maccharty's (http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470147563,descCd-authorInfo.html) implementation of repository pattern and unit of work pattern. It's very useful for unit-testing purpose to have own/fake implementation of IUnitOfWorkRepository. I got confused a little bit more with where do I store such contracts.

Thanks!

like image 990
lexeme Avatar asked Aug 05 '26 16:08

lexeme


1 Answers

Stored in Domainlayer. From my point of view you don´t want to depend on the infrastructure/DAL layers from your domainLayer.

The second best approach I´ve tried is to have a third separate assembly like DDDBaseFramework that u can resuse.

like image 138
Glenn Avatar answered Aug 07 '26 05:08

Glenn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!