Skip to content

Commit f541829

Browse files
committed
refactor: address
1 parent 1417e7b commit f541829

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

QueryKit.WebApiTestProject/Database/PersonConfiguration.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,18 @@ public void Configure(EntityTypeBuilder<TestingPerson> builder)
2626
opts.Property(x => x.Country).HasColumnName("physical_address_country");
2727
}).Navigation(x => x.PhysicalAddress)
2828
.IsRequired();
29+
30+
// builder.ComplexProperty(
31+
// x => x.PhysicalAddress,
32+
// y =>
33+
// {
34+
// y.Property(e => e.Line1).HasColumnName("physical_address_line1");
35+
// y.Property(e => e.Line2).HasColumnName("physical_address_line2");
36+
// y.Property(e => e.City).HasColumnName("physical_address_city");
37+
// y.Property(e => e.State).HasColumnName("physical_address_state");
38+
// y.ComplexProperty(e => e.PostalCode, z
39+
// => z.Property(s => s.Value).HasColumnName("physical_address_postal_code"));
40+
// y.Property(e => e.Country).HasColumnName("physical_address_country");
41+
// });
2942
}
3043
}

QueryKit.WebApiTestProject/Database/RecipeConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public void Configure(EntityTypeBuilder<Recipe> builder)
1616
builder.ComplexProperty(x => x.CollectionEmail,
1717
x => x.Property(y => y.Value)
1818
.HasColumnName("collection_email"));
19-
19+
2020
// example for a simple 1:1 value object
2121
// builder.Property(x => x.Percent)
2222
// .HasConversion(x => x.Value, x => new Percent(x))

QueryKit.WebApiTestProject/Entities/Address.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ public Address(string line1, string line2, string city, string state, PostalCode
2222
PostalCode = postalCode;
2323
Country = country;
2424
}
25+
26+
private Address() { }
2527
}

0 commit comments

Comments
 (0)