/// <summary> /// 根据ListDictionary保存条件保存实体映射表对应的记录 /// </summary> /// <param name="listCondition">保存条件</param> /// <param name="listColAndValue">保存字段</param> /// <returns>执行更新并返回受影响的行数</returns> public int Save(ListDictionary listCondition, ListDictionary listColAndValue) { ORMap <BaseEntity> ormap = new ORMap <BaseEntity>(this); return(ormap.Save(listCondition, listColAndValue)); }
/// <summary> /// 保存 比较实体前后的值(并与实体默认初始值比较确定保存哪些字段),若有与主键记录相同的就更新,没有就插入 /// </summary> /// <param name="dbCore">数据库访问核心类DbCore实例(用于DbCore事务,执行命令先打开(Open)数据库连接)</param> /// <returns>执行更新或插入数据操作并返回受影响的行数</returns> public int Save(DbCore dbCore) { ORMap <BaseEntity> ormap = new ORMap <BaseEntity>(this); return(ormap.Save(dbCore)); }
/// <summary> /// 根据HashTable保存条件保存实体映射表对应的记录 /// </summary> /// <param name="hashCondition">保存条件</param> /// <param name="hashColAndValue">保存字段</param> /// <returns>执行更新并返回受影响的行数</returns> public int Save(Hashtable hashCondition, Hashtable hashColAndValue) { ORMap <BaseEntity> ormap = new ORMap <BaseEntity>(this); return(ormap.Save(hashCondition, hashColAndValue)); }