TransactionScope and Npgsql - Prepared Transaction Issue
问题 I have following code: //... using (TransactionScope tScope = new TransactionScope()) { using (NpgsqlConnection myConnection = new NpgsqlConnection(_MyConnectionString)) { try { myConnection.Open(); //... tScope.Complete(); } catch (Exception ex) { logger.Error(ex); } finally { myConnection.Close(); } } } //... The problem is, when some error occurred transactionscope do rollback, but, on the PostgreSQL server I have prepared transaction. And applications can not work anything with database