Skip to content

Instantly share code, notes, and snippets.

@mikebrind
Created August 15, 2018 07:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikebrind/d11bb8392ea99d905a47f8fcc59ac7d9 to your computer and use it in GitHub Desktop.
Save mikebrind/d11bb8392ea99d905a47f8fcc59ac7d9 to your computer and use it in GitHub Desktop.
public class Customer
{
public int CustomerId { get; set; }
public string Name { get; set; }
public ICollection<Order> Orders { get; set; } = new HashSet<Order>();
}
public class Order
{
public int OrderId { get; set; }
public DateTime DateCreated { get; set; }
public int CustomerId { get; set; }
public Customer Customer { get; set; }
public ICollection<OrderItem> OrderItems { get; set; } = new HashSet<OrderItem>();
}
public class OrderItem
{
public int OrderItemId { get; set; }
public string Item { get; set; }
public decimal Price { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment