Skip to content

Instantly share code, notes, and snippets.

@DannyRusnok
Created January 7, 2022 16:09
Show Gist options
  • Save DannyRusnok/b5ad26928efe1684cff28ddc3895b2ec to your computer and use it in GitHub Desktop.
Save DannyRusnok/b5ad26928efe1684cff28ddc3895b2ec to your computer and use it in GitHub Desktop.
Value Objects Article
b.OwnsMany(x => x.Addresses, sb =>
{
sb.Property(x => x.City)
.HasMaxLength(255)
.HasDefaultValue(string.Empty);
sb.Property(x => x.Street)
.HasMaxLength(255)
.HasDefaultValue(string.Empty);
sb.Property(x => x.ZipCode)
.HasMaxLength(255)
.HasDefaultValue(string.Empty);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment