1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
// 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<Product>();
}
[Key]
public int CategoryID { get; set; }
public string CategoryName { get; set; }
public string Description { get; set; }
public byte[] Picture { get; set; }
public ICollection<Product> Products { get; set; }
}
public partial class Customer
{
public Customer()
{
this.Orders = new HashSet<Order>();
}
[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<Order> Orders { get; set; }
}
public partial class Order
{
private List<Order_Detail> _details;
[Key]
public int OrderID { get; set; }
public string CustomerID { get; set; }
public Nullable<int> EmployeeID { get; set; }
public Nullable<System.DateTime> OrderDate { get; set; }
public Nullable<System.DateTime> RequiredDate { get; set; }
public Nullable<System.DateTime> ShippedDate { get; set; }
public Nullable<int> ShipVia { get; set; }
public Nullable<decimal> 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_Detail> Order_Details
{
get
{
if (this._details == null)
{
this._details = new List<Order_Detail>();
}
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<Order>();
}
[Key]
public int ShipperID { get; set; }
public string CompanyName { get; set; }
public string Phone { get; set; }
public ICollection<Order> Orders { get; set; }
}
public partial class Product
{
public Product()
{
this.Order_Details = new HashSet<Order_Detail>();
}
[Key]
public int ProductID { get; set; }
public string ProductName { get; set; }
public Nullable<int> SupplierID { get; set; }
public Nullable<int> CategoryID { get; set; }
public string QuantityPerUnit { get; set; }
public Nullable<decimal> UnitPrice { get; set; }
public Nullable<short> UnitsInStock { get; set; }
public Nullable<short> UnitsOnOrder { get; set; }
public Nullable<short> ReorderLevel { get; set; }
public bool Discontinued { get; set; }
public Category Category { get; set; }
public ICollection<Order_Detail> Order_Details { get; set; }
public Supplier Supplier { get; set; }
}
public partial class Supplier
{
public Supplier()
{
this.Products = new HashSet<Product>();
}
[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<Product> Products { get; set; }
}
}
|