We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9c0380 commit 9f5c2cdCopy full SHA for 9f5c2cd
Extensions/Xtensive.Orm.BulkOperations/Internals/Operation.cs
@@ -45,7 +45,15 @@ public int Execute()
45
46
#region Non-public methods
47
48
- protected void EnsureTransactionIsStarted() => Transaction.Require(QueryProvider.Session);
+ protected void EnsureTransactionIsStarted()
49
+ {
50
+ Transaction.Require(QueryProvider.Session);
51
+#pragma warning disable 168
52
+ // this prepares connection which ensures that connection is opened
53
+ // this is weird way but it is required for some scenarios.
54
+ _ = QueryProvider.Session.Services.Demand<DirectSqlAccessor>().Transaction;
55
+#pragma warning restore 168
56
+ }
57
58
protected abstract int ExecuteInternal();
59
0 commit comments