ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Magda (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4619) .NET: TransactionScope documentation and example
Date Thu, 09 Feb 2017 17:40:41 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-4619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15859877#comment-15859877
] 

Denis Magda commented on IGNITE-4619:
-------------------------------------

[~ptupitsyn],

1. Ok, looks like I got it. I've tried to rephrase the comments from the code snippet for
this scenario to make things a bit clearer. Please see a variant below. Update the doc if
you are fine with it.

{code}
// Assigning a value for the key.
cache[1] = 0;

using (var tx = transactions.TxStart())            
{
  // Ignite transaction is started manually, TransactionScope below will not have any effect..
  using (new TransactionScope())
  {
    cache[1] = 2; //The update is enlisted into the outer Ignite transaction.
  }  // TransactionScope attempts to rever changes, will have no effect on the outer Ignite
transaction.

  tx.Commit();  // Committing Ignite transaction.
}

cache.Get(1);  // Returns 2.
{code}

> .NET: TransactionScope documentation and example
> ------------------------------------------------
>
>                 Key: IGNITE-4619
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4619
>             Project: Ignite
>          Issue Type: Task
>          Components: platforms
>    Affects Versions: 1.9
>            Reporter: Pavel Tupitsyn
>            Assignee: Denis Magda
>              Labels: .NET
>             Fix For: 1.9
>
>
> Create documentation and example for {{TransactionScope}} support (IGNITE-3430).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message