/// <summary> /// Update /// 根据传入实体修改。 /// </summary> /// <typeparam name="TEntity">类型参数</typeparam> /// <param name="connection">DbConnection</param> /// <param name="entity">实体数据信息</param> /// <param name="transaction">事务</param> /// <returns>bool</returns> public static bool Update <TEntity>(this IDbConnection connection, TEntity entity, IDbTransaction transaction = null) { try { return(DommelMapper.Update <TEntity>(connection, entity, transaction)); } catch (Exception ex) { throw new Exception(ex.Message); } }