예제 #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));
        }
예제 #2
0
        public static int Insert <T>(T entity, string tableName) where T : class
        {
            string sql = SqlBuilderHelper.InsertSql(entity, tableName);

            return(ExecuteNonQuery(sql));
        }