Refactored database registration to allow postgres to use internal representations for afster performance
This commit is contained in:
@@ -14,7 +14,8 @@ public sealed class CustomerConfiguration : IEntityTypeConfiguration<Customer>
|
||||
builder.Property(c => c.Email).IsRequired();
|
||||
builder.Property(c => c.Phone).IsRequired();
|
||||
builder.Property(c => c.Website).IsRequired();
|
||||
builder.Property(c => c.SocialMedia).IsRequired(false).HasColumnType("jsonb");
|
||||
builder.Property(c => c.Enabled).HasDefaultValue(true);
|
||||
|
||||
builder.OwnsMany(f => f.SocialMedia, b => { b.ToJson(); });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user