You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using (var connection = new XConnection(...))
{
connection.Open();
using (var transaction = connection.BeginTransaction())
using (var cmd = connection.CreateCommand()
{
Console.WriteLine(cmd.Transaction == null);
}
}
Connector/NET, SqlConnection and NpgsqlConnection all print true; MySqlConnector prints false because .Transaction is set to the active transaction. We should follow the pattern of other ADO.NET connectors and require .Transaction to be set explicitly.
It's possible this could be affecting #333 if commands are being created with an active transaction, then used again after that transaction is committed.
The text was updated successfully, but these errors were encountered:
Consider the following code:
Connector/NET,
SqlConnection
andNpgsqlConnection
all printtrue
; MySqlConnector printsfalse
because.Transaction
is set to the active transaction. We should follow the pattern of other ADO.NET connectors and require.Transaction
to be set explicitly.It's possible this could be affecting #333 if commands are being created with an active transaction, then used again after that transaction is committed.
The text was updated successfully, but these errors were encountered: