今天自己搭了一套基于三层的依赖注入mvc web api 的依赖注入框架,在此总结下相关配置 1.设置应用程序的.net Framework版本为 4.5 2.通过Nuget 安装autofac包 Install-Package Autofac Install-Package Autofac.WebApi 3.引用如下命名空间 using Autofac; using Autofac.Integration.WebApi; using Autofac.Integration.Mvc; using…
ASP.NET MVC 复制MVC项目代码到同一个项目的时候报错The request for ‘home’ has found the following matching controll “/”应用程序中的服务器错误. Multiple types were found that match the controller named ‘home’. This can happen if the route that services this request (‘{controller}/…