/// <summary> /// 删除一条记录(指定数据库) /// </summary> /// <param name="conn"></param> /// <param name="obj"></param> /// <returns></returns> public bool Delete(IConnection conn, object obj) { ObjectManager oa = _d1.GetObjectManager(obj.GetType()); return(oa.MyDelete(conn, obj) == 1); }
/// <summary> /// 删除满足条件的记录(指定数据库) /// </summary> /// <typeparam name="T"></typeparam> /// <param name="conn"></param> /// <param name="condition"></param> /// <returns></returns> public int DeleteList <T>(IConnection conn, Criteria condition) { ObjectManager oa = _d1.GetObjectManager(typeof(T)); return(oa.MyDeleteList(conn, condition)); }
/// <summary> ///选取一条记录(仅列出字段有效)(指定数据库) /// </summary> /// <param name="conn"></param> /// <param name="obj"></param> /// <param name="fields"></param> public void Select(IConnection conn, object obj, string[] fields) { ObjectManager oa = _d1.GetObjectManager(obj.GetType()); oa.MySelect(conn, obj, fields); }