/// <summary> /// 创建对应BL,如果缓存可用,则使用缓存 /// </summary> public static IBL Create <IBL>(DataBaseLib.DAL.UnitOfWork uw = null) where IBL : class { return(null == uw?CreateNew <IBL>() : CreateNew <IBL>(uw)); // 现在还没遇到性能瓶颈,无需使用以下方法 /*var service = CurrentService; * if (service == null) { * return null == uw ? CreateNew<IBL>() : CreateNew<IBL>(uw); * } * if (null == uw) { * return service.BL<IBL>() as IBL; * } * var cur_uw = service.UnitOfWork; * if (uw == cur_uw) { * return service.BL<IBL>() as IBL; * } else { * return CreateNew<IBL>(uw); * }*/ }
public BASE_USER_dal(DAL.UnitOfWork unitOfWork) : base(unitOfWork) { this.UnitOfWork = unitOfWork; }
public BLLService(DataBaseLib.DAL.UnitOfWork unitofwork) : base(unitofwork) { this.UnitOfWork = unitofwork; }
public 房屋租赁表_dal(DAL.UnitOfWork unitOfWork) : base(unitOfWork) { this.UnitOfWork = unitOfWork; }