title: create oracle transaction using C#
body: <p>I am using oracle transaction to insert into <strong>multi-tables</strong>  one master table and two details tables at the same time. so i will insert one record to the master table and multi-records to the other two tables.
  i need to return value 1 if the operation success in all tables, if error occurs i will return 0,and 3 if the data already exist in the master table. I need to do this in c#, here is my code,
  and how i can modify my code to insert to other tables using loops</p>
  
  <pre><code>public int RunOracleTransaction(Student s, Marks[] m, Course []s)
  {
  using (OracleConnection connection = new OracleConnection(connectionString))
  {
      connection.Open();
  
      OracleCommand command = connection.CreateCommand();
      OracleTransaction transaction;
  
      // Start a local transaction
      transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted);
      // Assign transaction object for a pending local transaction
      command.Transaction = transaction;
  
      try
      {
        // what i shall do to insert 1 record to master data and multi records //to details data as one transaction ?
      }
      catch (Exception e)
      {
          transaction.Rollback();
          Console.WriteLine(e.ToString());
          Console.WriteLine("Neither record was written to database.");
      }
  }
  }
  </code></pre>