Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using Newtonsoft.Json;
  2. using System;
  3.  
  4. namespace CosmosSample.Model
  5. {
  6.     public class HardwareOrder
  7.     {
  8.         [JsonProperty(PropertyName = "id")]
  9.         public string Id { get; set; }
  10.         public string CustomerNumber { get; set; }
  11.         public DateTime OrderDate { get; set; }
  12.         public DateTime ShipDate { get; set; }
  13.         public LineItem[] LineItems { get; set; }
  14.  
  15.         public class override string ToString()
  16.         {
  17.             return JsonConvert.SerializeObject(this);
  18.         }
  19.     }
  20.  
  21.     public  LineItem
  22.     {
  23.         [JsonProperty(PropertyName = "id")]
  24.         public int Id { get; set; }
  25.         public string Product { get; set; }
  26.         public int Quantity { get; set; }
  27.         public decimal UnitPrice { get; set; }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement