Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 8f78c56

Browse files
committed
Change to use higher-level OpenTransaction()
1 parent 9d94e15 commit 8f78c56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/ServiceStack.OrmLite.Tests/ShippersExample.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void Shippers_UseCase()
6868
int trainsTypeId, planesTypeId;
6969

7070
//Playing with transactions
71-
using (IDbTransaction dbTrans = db.BeginTransaction())
71+
using (IDbTransaction dbTrans = db.OpenTransaction())
7272
{
7373
db.Insert(new ShipperType { Name = "Trains" });
7474
trainsTypeId = (int)db.LastInsertId();
@@ -78,7 +78,7 @@ public void Shippers_UseCase()
7878

7979
dbTrans.Commit();
8080
}
81-
using (IDbTransaction dbTrans = db.BeginTransaction(IsolationLevel.ReadCommitted))
81+
using (IDbTransaction dbTrans = db.OpenTransaction(IsolationLevel.ReadCommitted))
8282
{
8383
db.Insert(new ShipperType { Name = "Automobiles" });
8484
Assert.That(db.Select<ShipperType>(), Has.Count.EqualTo(3));

0 commit comments

Comments
 (0)