// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Microsoft.Web.Http.Data.Test.Models { public partial class Category { public Category() { this.Products = new HashSet(); } [Key] public int CategoryID { get; set; } public string CategoryName { get; set; } public string Description { get; set; } public byte[] Picture { get; set; } public ICollection Products { get; set; } } public partial class Customer { public Customer() { this.Orders = new HashSet(); } [Key] public string CustomerID { get; set; } public string CompanyName { get; set; } public string ContactName { get; set; } public string ContactTitle { get; set; } public string Address { get; set; } public string City { get; set; } public string Region { get; set; } public string PostalCode { get; set; } public string Country { get; set; } public string Phone { get; set; } public string Fax { get; set; } [Association("Customer_Orders", "CustomerID", "CustomerID")] public ICollection Orders { get; set; } } public partial class Order { private List _details; [Key] public int OrderID { get; set; } public string CustomerID { get; set; } public Nullable EmployeeID { get; set; } public Nullable OrderDate { get; set; } public Nullable RequiredDate { get; set; } public Nullable ShippedDate { get; set; } public Nullable ShipVia { get; set; } public Nullable Freight { get; set; } [StringLength(50, MinimumLength = 0)] public string ShipName { get; set; } public string ShipAddress { get; set; } public string ShipCity { get; set; } public string ShipRegion { get; set; } public string ShipPostalCode { get; set; } public string ShipCountry { get; set; } [Association("Customer_Orders", "CustomerID", "CustomerID", IsForeignKey = true)] public Customer Customer { get; set; } [Association("Order_Details", "OrderID", "OrderID")] public List Order_Details { get { if (this._details == null) { this._details = new List(); } return this._details; } set { this._details = value; } } public Shipper Shipper { get; set; } } public partial class Order_Detail { [Key] [Column(Order = 1)] public int OrderID { get; set; } [Key] [Column(Order = 2)] public int ProductID { get; set; } public decimal UnitPrice { get; set; } public short Quantity { get; set; } public float Discount { get; set; } public Order Order { get; set; } public Product Product { get; set; } } public partial class Shipper { public Shipper() { this.Orders = new HashSet(); } [Key] public int ShipperID { get; set; } public string CompanyName { get; set; } public string Phone { get; set; } public ICollection Orders { get; set; } } public partial class Product { public Product() { this.Order_Details = new HashSet(); } [Key] public int ProductID { get; set; } public string ProductName { get; set; } public Nullable SupplierID { get; set; } public Nullable CategoryID { get; set; } public string QuantityPerUnit { get; set; } public Nullable UnitPrice { get; set; } public Nullable UnitsInStock { get; set; } public Nullable UnitsOnOrder { get; set; } public Nullable ReorderLevel { get; set; } public bool Discontinued { get; set; } public Category Category { get; set; } public ICollection Order_Details { get; set; } public Supplier Supplier { get; set; } } public partial class Supplier { public Supplier() { this.Products = new HashSet(); } [Key] public int SupplierID { get; set; } public string CompanyName { get; set; } public string ContactName { get; set; } public string ContactTitle { get; set; } public string Address { get; set; } public string City { get; set; } public string Region { get; set; } public string PostalCode { get; set; } public string Country { get; set; } public string Phone { get; set; } public string Fax { get; set; } public string HomePage { get; set; } public virtual ICollection Products { get; set; } } }