markrendle / Simple.Data

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

InvalidOperationException when using Transaction with Options #314

Open KevWK314 opened 10 years ago

KevWK314 commented 10 years ago

Hi

I'm trying to use Transaction with Options to up the command timeout value. I'm getting an InvalidOperationException when I try to commit.

The code is

var db = Database.OpenConnection(_connectionString); _transaction = db.BeginTransaction().WithOptions(new AdoOptions(90));

...

_transaction.Commit(); // Throws the exception