【发布时间】:2014-11-10 00:10:54
【问题描述】:
我正在将 NEventStore 添加到我现有的项目中,并且我正在使用 DI。
我想将CommonDomain.Persistence.EventStore.IRepository 的实例注入到我的 MVC 控制器中。这个接口的The only implementation是EventStoreRepository。
这个类依赖于IConstructAggregates,而only implementation I find是AggregateFactory,标记为内部,位于测试项目中,文件名很奇怪。
我不应该使用IRepository吗? (为什么它被标记为公共而不被任何内部代码使用?)
我正在查看用于操作聚合的示例项目 here 和 IRepository。
或者我应该自己实现IConstructAggregates?
【问题讨论】:
标签: c# dependency-injection event-sourcing object-composition neventstore