Exemplo n.º 1
0
        public void Persist(DataSet ds)
        {
            DAPersons person = new DAPersons();


            using (DbTransaction transaction = person.CreateTransaction())
            {
                try
                {
                    DataTable dtPerson = ds.Tables[Entities.Persons.TABLE_NAME];

                    person.SavePersons(transaction, dtPerson.Rows[0]);
                    person.CommitTransaction(transaction);
                }
                catch (Exception e)
                {
                    person.RollbackTransaction(transaction);
                    throw e;
                }
            }
        }