Hi I am using (evaluating :)) Subsonic ActiveRecord mode for accessing sqLite. Need transaction to work. Regular stuff... Of ocurse!
Following snippet explains the desired logic. I couldn't find the right example in docs.
using (TransactionScope ts = new TransactionScope())
{
using (SharedDbConnectionScope sharedConnectionScope = new SharedDbConnectionScope())
{
// insert data in table 1 with primary key column. Save the id returned for later use.
// insert data in table 2 with a foreign key column. Use the Id generated in table 1.
// ts.commit here
}
}
Please advise. Thanks