Does LINQ to SQL provider for Oracle support transactions?
Posted: Tue 22 Dec 2009 21:44
I've been trying trying to create a transaction to commit / rollback stored procedure calls using the LINQ to SQL provider, but haven't been able to get it work.
I've been trying this type of code without success:
--------
using (TestDataContext context = new TestDataContext(ConnectionString))
{
context.Connection.Open();
context.Transaction = context.Connection.BeginTransaction();
context.SomeSprocToInsertData(data1, data2, data3);
context.Transaction.Rollback();
}
-------
The sproc runs, the data is inserted...And the Rollback is completely ignored.
Are transactions supported? If so, what am I doing wrong?
Thanks,
Roy
I've been trying this type of code without success:
--------
using (TestDataContext context = new TestDataContext(ConnectionString))
{
context.Connection.Open();
context.Transaction = context.Connection.BeginTransaction();
context.SomeSprocToInsertData(data1, data2, data3);
context.Transaction.Rollback();
}
-------
The sproc runs, the data is inserted...And the Rollback is completely ignored.
Are transactions supported? If so, what am I doing wrong?
Thanks,
Roy