我想使用Castle Windsor作为我的解决方案的依赖注入,包括以下项目:
在业务层中,有一个名为PostServiceimplementation 的类IPostService来管理博客帖子.在PostsController对中的mvc项目依赖IPostService.但是,PostService(相应的具体实现)本身依赖于IPostRepository.
我在哪里配置Castle Windsor以返回PostRepository要解决的实例IPostRepository?该的mvc项目不知道的数据访问项目.因此,我无法在global.asax或Mvc中的其他位置配置组件绑定.
[更新]依赖关系图
现在我找到了解决方案(再次感谢Darin Dimitrov!)我想与您分享当前的依赖关系图.

asp.net-mvc dependency-injection castle-windsor asp.net-mvc-3