/// <summary> /// 带数据库上下文的构造函数 /// </summary> /// <param name="db"></param> /// <param name="opID"></param> public IRAPBizModel(IDbContext db, int opID) { _opID = opID; this._db = db; _t4treeBase = new IRAPTreeBase(_db, 0, 4, opID); _leaf = _t4treeBase.Leaf; _namespaces = _db.Set <SysNameSpaceEntity>().Where(c => c.PartitioningKey == 0 && c.LanguageID == 30); }
/// <summary> /// 构造函数 /// </summary> /// <param name="opID"></param> public IRAPBizModel(int opID) { _opID = opID; _db = DBContextFactory.Instance.CreateContext("IRAPContext"); _t4treeBase = new IRAPTreeBase(_db, 0, 4, opID); _leaf = _t4treeBase.Leaf; _namespaces = _db.Set <SysNameSpaceEntity>().Where(c => c.PartitioningKey == 0 && c.LanguageID == 30); }