我已经开始学习 DDD 并且想知道其他人是如何组织他们的项目的。
我开始围绕我的 AggregateRoots 进行组织:
MyApp.Domain(域模型的命名空间)
MyApp.Domain.Product
- 产品
- IProductService
- IProductRepository
- 等
MyApp.Domain.Comment
- 评论
- ICommentService
- ICommentRepository
- 等
MyApp.Infrastructure
- ...
MyApp.Repositories
- ProductRepository : IProductRepository
- 等等
我遇到的问题是我必须将我的域产品引用为 MyApp.Domain.Product.Product 或 Product.Product。我还与产品的 linq 数据模型发生冲突......我必须使用丑陋的代码行来区分两者,例如 MyApp.Domain.Product.Product 和 MyApp.Respoitories.Product。
我真的很想看看其他人如何组织他们的 DDD 解决方案......
我使用 Visual Studio 作为我的 IDE。
非常感谢。