public static void ExecDelete(this IDbConnection con, string sTableName, long ID, IDbTransaction tran = null) { string sql = DynamicQuery.GetDeleteQuery(sTableName); con.Execute(sql, new { ID }, tran); }
public static long ExecInsertWithID(this IDbConnection con, string sTableName, dynamic param, IDbTransaction tran = null) { string sql = DynamicQuery.GetInsertQueryWithID(sTableName, param); return(con.Execute(sql, (object)param, tran)); }
public static void ExecUpdate(this IDbConnection con, string sTableName, dynamic param, IDbTransaction tran = null) { string sql = DynamicQuery.GetUpdateQuery(sTableName, param); con.Execute(sql, (object)param, tran); }
public static long ExecInsert(this IDbConnection con, string sTableName, dynamic param, IDbTransaction tran = null) { string sql = DynamicQuery.GetInsertQuery(sTableName, param, false); return(con.Query <int>(sql, (object)param, tran).FirstOrDefault()); }