INNER CODE UNIT · C#
OrderAddress
mongodb/mongo-efcore-provider · benchmarks/MongoDB.EntityFrameworkCore.Benchmarks/Model.Extended.cs:28
public class OrderAddress // owned (nested under ShippingInfo)
{
public string Street { get; set; } = "";
public string City { get; set; } = "";
public int Zip { get; set; }
}
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; } }