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

Commit c1487d2

Browse files
committed
Downgrade to C# 5 so builds in CI
1 parent 6fb5cdf commit c1487d2

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

src/ServiceStack.OrmLite.PostgreSQL.Tests/Issues/JsonDataTypeTests.cs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,15 @@ public void Can_save_and_restore_JSON_property()
1616
{
1717
OrmLiteConfig.DialectProvider.NamingStrategy = new OrmLiteNamingStrategyBase();
1818

19-
var item = new LicenseCheckTemp();
20-
item.Body = new CheckHistory();
21-
item.Body.List.Add(new ItemHistory { AddedOn = DateTime.MaxValue, Note = "Test" });
19+
var item = new LicenseCheckTemp
20+
{
21+
Body = new CheckHistory
22+
{
23+
List = {
24+
new ItemHistory { AddedOn = DateTime.MaxValue, Note = "Test" }
25+
}
26+
}
27+
};
2228

2329
using (var db = OpenDbConnection())
2430
{
@@ -38,7 +44,7 @@ public void Can_save_and_restore_JSON_property()
3844
{
3945
foreach (var itemHistory in licenseCheck.Body.List)
4046
{
41-
$"{itemHistory.AddedOn} : Note {itemHistory.Note}".Print();
47+
"{0} : Note {1}".Print(itemHistory.AddedOn, itemHistory.Note);
4248
}
4349
}
4450
}
@@ -57,7 +63,12 @@ public class LicenseCheckTemp
5763

5864
public class CheckHistory
5965
{
60-
public List<ItemHistory> List { get; set; } = new List<ItemHistory>();
66+
public CheckHistory()
67+
{
68+
this.List = new List<ItemHistory>();
69+
}
70+
71+
public List<ItemHistory> List { get; set; }
6172
}
6273

6374
public class ItemHistory
@@ -67,5 +78,4 @@ public class ItemHistory
6778
public DateTime AddedOn { get; set; }
6879

6980
}
70-
7181
}

0 commit comments

Comments
 (0)