建立MVC的依赖项注入 Setting up MVC Dependency Injection 精通ASP-NET-MVC-5-弗瑞曼
2016-06-08 12:14
726 查看
The result of the three steps I showed you in the previous section is that the knowledge about the implementation class that should be instantiated to fulfill requests for the IValueCalculator interface has been set up in Ninject.
结果是 三步 , 前面的部分 使用 Ninject 去 实例化 IValueCalculator接口
Of course, I have not improved my application because that knowledge remains defined in the Home controller, meaning that the Home controller is still tightly coupled to the LinqValueCalculator class.
当然 我没有提升我的应用是因为 Home controller 里面有定义, home controller 使用 LinqValueCalculator 类
In the following sections, I will show you how to embed Ninject at the heart of the MVC application, which will allow me to simplify the controller, expand the influence Ninject has so that it works across the app, and move the configuration out of the controller.
接下来部分, 将展示 怎样 嵌入 Ninject在 mvc 应用里 , 一个简单controller ,
拓展影响 到 Ninject , 从controller里分离配置.
翻译的烂大街哇
晕死
结果是 三步 , 前面的部分 使用 Ninject 去 实例化 IValueCalculator接口
Of course, I have not improved my application because that knowledge remains defined in the Home controller, meaning that the Home controller is still tightly coupled to the LinqValueCalculator class.
当然 我没有提升我的应用是因为 Home controller 里面有定义, home controller 使用 LinqValueCalculator 类
In the following sections, I will show you how to embed Ninject at the heart of the MVC application, which will allow me to simplify the controller, expand the influence Ninject has so that it works across the app, and move the configuration out of the controller.
接下来部分, 将展示 怎样 嵌入 Ninject在 mvc 应用里 , 一个简单controller ,
拓展影响 到 Ninject , 从controller里分离配置.
翻译的烂大街哇
晕死
相关文章推荐
- 基于.Net Framework 4.0 Web API开发(5):ASP.NET Web APIs AJAX 跨域请求解决办法(CORS实现)
- spring Aspect 实现自定义注解的日志记录,有时候注解类不起作用的原因分析
- ASP.NET Core 中文文档 第一章 入门
- 2016-6-电商班 Asp.Net MVC4 期末复习要点
- Ajax+Asp.Net无刷新分页
- CasperJS基于PhantomJS抓取页面
- Excel 从ASP.NET 服务器下载到 本地
- Asp中Linq怎么取得表中某列的最大值
- KafkaSpout分析:配置
- Aspose.Cells 设置背景颜色
- visual studio 无法查看aspx源代码
- ASP.NET MVC 5调用其他Action
- Raspberry - 树莓派系统安装
- ASP.NET中,HiddenField隐藏控件的用法
- ASP.NET中,HiddenField隐藏控件的用法
- 【Asp.Net】五大对象
- ASP.NET调用word出错
- asp.net在word页眉插入条形码
- ASP.NET Core 中文文档
- 源码的说明 ASP.NET MVC 5框架揭秘.zip