markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

Transaction is not work with non-dbo stored procedure using 0.19.0.0 from Nuget. #345

Open aixllxia opened 10 years ago

aixllxia commented 10 years ago

Hi,

Simple.Data's transaction is not work with non-dbo stored procedure using 0.19.0.0 from Nuget. My C# code as:

var db = Database.Open(); using (var transaction = db.BeginTransaction()) { try { transaction.MySchema.Calculate(); transaction.Commit(); } catch { transaction.Rollback(); } }

The calculate stored procedure contains insert and update statements to add/modify many tables, when there is error raise in one table, it cannot be rollback the data modified or inserted.