2

我的搜索还没有找到一个像样的教程,关于如何为 ASP.NET Web API( IHttpController 而不是 IController )实现 Castle.Windsor ...

有一些博客讨论了这个话题,但这些都需要对 DI 和温莎有专家级的理解。

有谁知道关于这个主题的教程,对于 DI 和 Windsor 相对较新的人可以遵循?

类似于 MVC3 的 Windsor 教程:

http://stw.castleproject.org/Windsor.Windsor-tutorial-part-one-getting-Windsor.ashx

4

2 回答 2

1

http://blog.ploeh.dk/2012/10/03/DependencyInjectionInASPNETWebAPIWithCastleWindsor.aspx

于 2012-10-03T18:20:50.190 回答
0

You could try downloading the code from WebApiContrib, and dig into that. You can find the Castle Windsor part here

Not much of a tutorial though, as it gives you the entire code, but it might help :)

于 2012-07-17T12:58:21.603 回答