© 2026 Hedgehog Software, LLC
modelBuilder.Entity<Transaction>().Property("ItemsSoldAndAmount").IsRequired();
public class Transaction { ... [Required] public List<AmountItem> ItemsSoldAndAmount { get; set; } = new List<AmountItem>(); ... }
public class AmountItem { [Required] public ObjectId Identifier { get; set; } [Required] public Item? Item { get; set; } [Required] public double amount { get; set; } }