INNER CODE UNIT · C#
LineItem
mongodb/mongo-efcore-provider · benchmarks/MongoDB.EntityFrameworkCore.Benchmarks/Model.Extended.cs:35
public class LineItem // owned-collection element
{
public string Sku { get; set; } = "";
public int Qty { get; set; }
public ItemMeta Meta { get; set; } = new(); // nested owned (inside collection element)
public List<Discount> Discounts { get; set; } = new(); // nested owned collection (inside element)
}
public class ItemMeta { public string Category { get; set; } = ""; public double Weight { get; set; } }
public class Discount { public string Kind { get; set; } = ""; public decimal Amount { get; set; } }