Skip to content

Instantly share code, notes, and snippets.

@jzwang-dev
Last active February 16, 2021 12:14
Show Gist options
  • Save jzwang-dev/98d73d56598ca10a0149df18f7ae0c9c to your computer and use it in GitHub Desktop.
Save jzwang-dev/98d73d56598ca10a0149df18f7ae0c9c to your computer and use it in GitHub Desktop.
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