We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4b460f commit 55e1461Copy full SHA for 55e1461
Orm/Xtensive.Orm/Orm/Transaction.cs
@@ -247,11 +247,10 @@ private void PromoteLifetimeTokens()
247
248
private void PromoteLifetimeTokensToSession()
249
{
250
- if (Outer != null
251
- || !Session.TryPromoteTokens(EnumerableUtils.One(LifetimeToken).Union(lifetimeTokens))) {
252
- throw new InvalidOperationException("Promoting to session is not supported.");
+ if (Outer == null
+ && Session.TryPromoteTokens(EnumerableUtils.One(LifetimeToken).Union(lifetimeTokens))) {
+ ClearLifetimeTokens();
253
}
254
- ClearLifetimeTokens();
255
256
257
private void ClearLifetimeTokens()
0 commit comments