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

Commit a2236e6

Browse files
committed
Handle alt default for StripUpperInLike in .NET Core
1 parent 111b256 commit a2236e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/ServiceStack.OrmLite.Tests/Expression/SelectExpressionTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ public void Can_perform_case_sensitive_likes()
222222
Func<string> normalizedSql = () =>
223223
db.GetLastSql().Replace("\"", "").Replace("`", "").Replace("Name", "name").Replace("NAME", "name").Replace(":","@");
224224

225+
var hold = OrmLiteConfig.StripUpperInLike; //.NET Core defaults to `true`
226+
OrmLiteConfig.StripUpperInLike = false;
227+
225228
db.Count<Text>(q => q.Name.StartsWith("A"));
226229
Assert.That(normalizedSql(),
227230
Does.Contain("upper(name) like @0".NormalizeSql()));
@@ -248,7 +251,7 @@ public void Can_perform_case_sensitive_likes()
248251
Assert.That(normalizedSql(),
249252
Does.Contain("name like @0".NormalizeSql()));
250253

251-
OrmLiteConfig.StripUpperInLike = false;
254+
OrmLiteConfig.StripUpperInLike = hold;
252255
}
253256
}
254257

0 commit comments

Comments
 (0)