Last active
February 16, 2021 12:14
-
-
Save jzwang-dev/98d73d56598ca10a0149df18f7ae0c9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
namespace Models | |
{ | |
public class Order | |
{ | |
public int order_id { get; set; } | |
public string customer_email { get; set; } | |
public IEnumerable<OrderDetail> details { get; set; } | |
} | |
public class OrderDetail | |
{ | |
public string product_name { get; set; } | |
public int quantity { get; set; } | |
} | |
public static class OrderUtil | |
{ | |
public static Order GetTestOrder() | |
{ | |
return new Order | |
{ | |
order_id = 1, | |
customer_email = "jason@gms.ndhu.edu.tw", | |
details = new List<OrderDetail> { | |
new OrderDetail{ product_name = "basketball", quantity = 100 }, | |
new OrderDetail { product_name = "soccer", quantity = 50 } | |
} | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment