I'm using Visual Studio 2008, C#, SQLite via System.Data.SQLite with SubSonic 3. My application has gotten to a state where I need to upgrade the database schema (add columns, triggers, etc) then add new records via SubSonic generated ActiveRecord objects - all within the scope of a single transaction so that any failures could be nicely rolled back.
Ideally, this is sort of what I was hoping to do:
Begin Transaction
try
Update Schema to latest version
Use SubSonic objects to add new records/modify existing
Commit Transaction
catch
Rollback Transaction
Unfortunately, this doesn't work. All the schema changes are currently being via SubSonic.Query.CodingHorror, which doesn't seem to respect transactions. Is there a way to perform both schema changes and SubSonic data changes within the scope of a single transaction?