Added transaction support to Dalapi's DataCommon class

// open a transaction
using (DataCommon.DalapiTransaction transaction = new
DataCommon.DalapiTransaction())
{
try
{
// add some data
TestingTableDO first = new TestingTableDO() { ExpectedDueDate =
DateTime.Now.AddDays(5), Id = 1, Name = "First", SystemName = "Primary
System" };
TestingTable.Create(first);
Console.WriteLine("Added a record");

// commit the transaction
transaction.CommitTransaction();
Console.WriteLine("Committed");
}
catch (Exception ex)
{
// rollback the transaction
transaction.RollbackTransaction();
Console.WriteLine("Rolled back");
}
}
More robust solution

The first commit stored the transaction object using a
ThreadStaticAttribute on a static field. but after researching this
solution it turns out not to be entirely reliable in asp.net
applications.

The new approach is almost identical except that you have to pass the
transaction object to the DAL method to execute  using the transaction.
This approach will work on any platform web or client, and will not lead
to strange results and corrupted data somewhere down the line.