This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
src/ServiceStack.OrmLite.PostgreSQL.Tests/Issues Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,15 @@ public void Can_save_and_restore_JSON_property()
16
16
{
17
17
OrmLiteConfig . DialectProvider . NamingStrategy = new OrmLiteNamingStrategyBase ( ) ;
18
18
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
+ } ;
22
28
23
29
using ( var db = OpenDbConnection ( ) )
24
30
{
@@ -38,7 +44,7 @@ public void Can_save_and_restore_JSON_property()
38
44
{
39
45
foreach ( var itemHistory in licenseCheck . Body . List )
40
46
{
41
- $ " { itemHistory . AddedOn } : Note { itemHistory . Note } ". Print ( ) ;
47
+ "{0 } : Note {1 }". Print ( itemHistory . AddedOn , itemHistory . Note ) ;
42
48
}
43
49
}
44
50
}
@@ -57,7 +63,12 @@ public class LicenseCheckTemp
57
63
58
64
public class CheckHistory
59
65
{
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 ; }
61
72
}
62
73
63
74
public class ItemHistory
@@ -67,5 +78,4 @@ public class ItemHistory
67
78
public DateTime AddedOn { get ; set ; }
68
79
69
80
}
70
-
71
81
}
You can’t perform that action at this time.
0 commit comments