2012年5月13日

网上购物系统(Task101)——业务逻辑层BLL(工厂模式实现热插拔)

摘要: 源代码:13033480群共享面向接口的业务管理层,已经很好地解决了数据库的切换问题,不过,这需要修改业务逻辑层中的两个类Category.cs和Item.cs中的语句private staticreadonlyICategory dal =new WestGarden.DAL.Category();和private staticreadonlyIItem dal =new WestGarden.DAL.Item();然后重新编译、运行,相当于冷启动。能不能不再重新编译、运行,直接进行切换,实现所谓的“热插拔”呢?下面的工厂模式解决了这一问题,你只需要改变一下Web.config配置文件,就可 阅读全文

posted @ 2012-05-13 17:22 WestGarden 阅读(205) 评论(0) 推荐(0) 编辑

网上购物系统(Task100)——业务逻辑层BLL(面向接口的编程模式)

摘要: 源代码:13033480群共享【操作步骤】一、新建类库IDAL,设置属性,添加引用→项目→Model二、添加类ICategory.cs和IItem.cs1、ICategory.csusing System;using System.Collections.Generic;using WestGarden.Model;namespace WestGarden.IDAL{ public interface ICategory { IList<CategoryInfo> GetCategories(); CategoryInfo GetCategory(str... 阅读全文

posted @ 2012-05-13 10:13 WestGarden 阅读(354) 评论(0) 推荐(0) 编辑

导航