摘要: 背景在不使用注入容器之前,我们的项目往往存在着大量耦合的类,这使得我们在开发大型项目时难以维护。比如下面这个简单的MVC框架的例子,计算购物车的产品价格总和:/// /// 产品模型类/// public class Product { public int ProductID { get; set; } public string Name { get;... 阅读全文
posted @ 2017-01-07 17:00 iwsx 阅读(383) 评论(0) 推荐(0) 编辑