Want to use transaction in normal process

Hi All,

I am not using any database things. But I want to use transaction for my process (two process should be done simultaneously or not). I want to know is there any facility in .net for this




Answer this question

Want to use transaction in normal process

  • Sniper167

    I don't quite understand, please elaborate.

  • Thomas.Goddard

    I want to use transaction facility. just like there in database.

    in my project I have to do two operations let's say op1 and op2.

    now either op1 and op2 both done or not at all.

    e.g. I have to debit some amount from one account(op1) and credit that amount to my account(op2).

    now if op1 is done and some problem comes then it will create a problem.

    so if op1 done and some problem comes in op2 then op1 should be undone.

    means both operation should be done or none of the operation.

    Now my question is "Is there any facility in .net for this kind of process"



  • itsryan

    In fact, there is an entire namespace in .NET 2.0 for this purpose: System.Transactions. However, to use this system in memory, you have to write the code that performs the commits and rollbacks on your objects.

  • Want to use transaction in normal process