技术总奸

2012年4月3日

使用Autofac在ASP.NET Web API上实现依赖注入

摘要: 【原文】Dependency Injection in ASP.NET Web API using Autofac摘要在ASP.NET Web API里使用Autofac通过NuGet安装Autofac.WebApi。(当然要先安装Autofac.dll)。PM > Install-Package Autofac.WebApi引用如下命名空间。using Autofac;using Autofac.Integration.WebApi;再按照如下代码配置Autofac。 public static class Bootstrapper { public static voi... 阅读全文

posted @ 2012-04-03 11:22 阿福 阅读(14244) 评论(1) 推荐(1) 编辑