Example #1
0
        public static int InsertWitTransation <T>(T entity, string tableName, MySqlTransaction tran) where T : class
        {
            string sql = SqlBuilderHelper.InsertSql(entity, tableName);

            return(ExecuteNonQuery(tran, CommandType.Text, sql));
        }
Example #2
0
        public static int Insert <T>(T entity, string tableName) where T : class
        {
            string sql = SqlBuilderHelper.InsertSql(entity, tableName);

            return(ExecuteNonQuery(sql));
        }