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

Commit 5cc4253

Browse files
committed
Add example of Updating bool false value with UpdateOnly
1 parent d02367f commit 5cc4253

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/ServiceStack.OrmLite.Tests/OrmLiteUpdateTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ public void Can_UpdateOnly_bool_columns()
223223

224224
Assert.Throws<ArgumentException>(() =>
225225
db.UpdateNonDefaults(new PocoWithBool { Bool = false }, x => x.Id == 1));
226+
227+
db.UpdateOnly(new PocoWithBool { Bool = false },
228+
onlyFields: x => x.Bool,
229+
where: x => x.Id == 1);
230+
row = db.SingleById<PocoWithBool>(1);
231+
Assert.That(row.Bool, Is.False);
226232
}
227233
}
228234

0 commit comments

Comments
 (0)