A third variation of the shopping cart DTO - everything at once!
source link: https://gist.github.com/einarwh/3adcb5a2408572b0d7e381a5496722fb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Instantly share code, notes, and snippets.
class ShoppingCart { [JsonProperty("_state")] public string State { get; set; }
[JsonProperty("unpaidItems", NullValueHandling = NullValueHandling.Ignore)] public Item[] UnpaidItems { get; set; }
[JsonProperty("paidItems", NullValueHandling = NullValueHandling.Ignore)] public Item[] PaidItems { get; set; }
[JsonProperty("payment", NullValueHandling = NullValueHandling.Ignore)] public Money Payment { get; set; }
[JsonProperty("timestamp", NullValueHandling = NullValueHandling.Ignore)] public string Timestamp { get; set; } }
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK