Пример #1
0
        /// <summary>
        /// Update操作
        /// </summary>
        /// <param name="data">带更新字段</param>
        /// <param name="condition">更新条件</param>
        /// <param name="commandTimeout"></param>
        /// <returns></returns>
        public int Update(dynamic data, dynamic condition, int?commandTimeout = null)
        {
            var sql = BuildUpdateSql(data, condition, out DynamicParameters parameters);

            var result = DapperDBHelper.Execute(sql, param: parameters, commandTimeout: commandTimeout);

            return(result);
        }
Пример #2
0
 /// <summary>
 /// The Execute
 /// </summary>
 /// <param name="sql">The sql<see cref="string"/></param>
 /// <param name="param">The param<see cref="object"/></param>
 /// <param name="timeout">The timeout<see cref="int?"/></param>
 /// <returns>The <see cref="int"/></returns>
 public int Execute(string sql, object param, int?timeout = null)
 {
     return(DapperDBHelper.Execute(sql, param: param, commandTimeout: timeout));
 }