Firebird 2.5 + EF6, how to set transaction to wait

entity-framework-6 firebird transactions

Question

How can I set transactions in EF6 with firebird provider 4.0 EF6 to wait. Default is no wait, so I get a lot of exceptions.

To set the transaction isolation level, I use dbContext.Database.StartTransaction(). I try to use isolation level serializable to serialize the access to one table. I only read a value, add a constant and write that new value back.

I always got the exception lock conflict on no wait transaction, that's why I want to use a transaction that wait until the other has ended.

Popular Answer

Use the BeginTransaction overload on FbConnection where you can specify TPB thus whatever you want Firebird related. Then use UseTransaction method to tell Entity Framework to use that transaction.




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why