annotate UnitTests/Linq/Model/Northwind.cs @ 6:11b6da379593

Исправлена странная ошибка при использовании OfType<...>().Where(...)
author cin
date Mon, 05 Dec 2016 05:50:52 +0300
parents f990fcb411a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
1 using System;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
2 using System.Collections.Generic;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
3 using System.Data.Linq;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
4
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
5 using BLToolkit.DataAccess;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
6 using BLToolkit.Mapping;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
7
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
8 namespace Data.Linq.Model
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
9 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
10 public class Northwind
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
11 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
12 public abstract class EntityBase<T>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
13 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
14 protected abstract T Key { get; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
15
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
16 public override bool Equals(object obj)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
17 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
18 return GetType() == obj.GetType() && Key.Equals(((EntityBase<T>)obj).Key);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
19 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
20
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
21 public override int GetHashCode()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
22 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
23 return Key.GetHashCode();
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
24 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
25 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
26
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
27 [TableName("Categories")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
28 public class Category
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
29 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
30 [PrimaryKey, NonUpdatable] public int CategoryID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
31 [NotNull] public string CategoryName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
32 public string Description;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
33 public Binary Picture;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
34
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
35 [Association(ThisKey="CategoryID", OtherKey="CategoryID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
36 public List<Product> Products;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
37 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
38
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
39 [TableName("CustomerCustomerDemo")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
40 public class CustomerCustomerDemo
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
41 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
42 [PrimaryKey, NotNull] public string CustomerID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
43 [PrimaryKey, NotNull] public string CustomerTypeID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
44
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
45 [Association(ThisKey="CustomerTypeID", OtherKey="CustomerTypeID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
46 public CustomerDemographic CustomerDemographics;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
47
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
48 [Association(ThisKey="CustomerID", OtherKey="CustomerID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
49 public Customer Customers;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
50 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
51
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
52 [TableName("CustomerDemographics")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
53 public class CustomerDemographic
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
54 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
55 [PrimaryKey, NotNull] public string CustomerTypeID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
56 public string CustomerDesc;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
57
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
58 [Association(ThisKey="CustomerTypeID", OtherKey="CustomerTypeID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
59 public List<CustomerCustomerDemo> CustomerCustomerDemos;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
60 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
61
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
62 [TableName("Customers")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
63 public class Customer : EntityBase<string>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
64 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
65 [PrimaryKey] public string CustomerID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
66 [NotNull] public string CompanyName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
67 public string ContactName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
68 public string ContactTitle;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
69 public string Address;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
70 public string City;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
71 public string Region;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
72 public string PostalCode;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
73 public string Country;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
74 public string Phone;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
75 public string Fax;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
76
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
77 [Association(ThisKey="CustomerID", OtherKey="CustomerID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
78 public List<CustomerCustomerDemo> CustomerCustomerDemos;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
79
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
80 [Association(ThisKey="CustomerID", OtherKey="CustomerID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
81 public List<Order> Orders;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
82
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
83 protected override string Key
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
84 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
85 get { return CustomerID; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
86 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
87 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
88
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
89 [TableName("Employees")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
90 public class Employee : EntityBase<int>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
91 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
92 [PrimaryKey, NonUpdatable] public int EmployeeID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
93 [NotNull] public string LastName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
94 [NotNull] public string FirstName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
95 public string Title;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
96 public string TitleOfCourtesy;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
97 public DateTime? BirthDate;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
98 public DateTime? HireDate;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
99 public string Address;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
100 public string City;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
101 public string Region;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
102 public string PostalCode;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
103 public string Country;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
104 public string HomePhone;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
105 public string Extension;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
106 public Binary Photo;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
107 public string Notes;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
108 public int? ReportsTo;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
109 public string PhotoPath;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
110
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
111 [Association(ThisKey="EmployeeID", OtherKey="ReportsTo")] public List<Employee> Employees;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
112 [Association(ThisKey="EmployeeID", OtherKey="EmployeeID")] public List<EmployeeTerritory> EmployeeTerritories;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
113 [Association(ThisKey="EmployeeID", OtherKey="EmployeeID")] public List<Order> Orders;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
114 [Association(ThisKey="ReportsTo", OtherKey="EmployeeID")] public Employee ReportsToEmployee;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
115
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
116 //[MapIgnore]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
117 protected override int Key
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
118 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
119 get { return EmployeeID; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
120 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
121 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
122
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
123 [TableName("EmployeeTerritories")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
124 public class EmployeeTerritory
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
125 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
126 [PrimaryKey] public int EmployeeID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
127 [PrimaryKey, NotNull] public string TerritoryID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
128
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
129 [Association(ThisKey="EmployeeID", OtherKey="EmployeeID")] public Employee Employee;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
130 [Association(ThisKey="TerritoryID", OtherKey="TerritoryID")] public Territory Territory;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
131 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
132
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
133 [TableName("Order Details")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
134 public class OrderDetail
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
135 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
136 [PrimaryKey] public int OrderID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
137 [PrimaryKey] public int ProductID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
138 public decimal UnitPrice;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
139 public short Quantity;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
140 public float Discount;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
141
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
142 [Association(ThisKey="OrderID", OtherKey="OrderID")] public Order Order;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
143 [Association(ThisKey="ProductID", OtherKey="ProductID")] public Product Product;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
144 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
145
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
146 [TableName("Orders")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
147 public class Order : EntityBase<int>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
148 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
149 [PrimaryKey, NonUpdatable] public int OrderID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
150 public string CustomerID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
151 public int? EmployeeID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
152 public DateTime? OrderDate;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
153 public DateTime? RequiredDate;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
154 public DateTime? ShippedDate;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
155 public int? ShipVia;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
156 public decimal Freight;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
157 public string ShipName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
158 public string ShipAddress;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
159 public string ShipCity;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
160 public string ShipRegion;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
161 public string ShipPostalCode;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
162 public string ShipCountry;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
163
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
164 [Association(ThisKey="OrderID", OtherKey="OrderID")] public List<OrderDetail> OrderDetails;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
165 [Association(ThisKey="CustomerID", OtherKey="CustomerID", CanBeNull=false)] public Customer Customer;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
166 [Association(ThisKey="EmployeeID", OtherKey="EmployeeID")] public Employee Employee;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
167 [Association(ThisKey="ShipVia", OtherKey="ShipperID")] public Shipper Shipper;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
168
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
169 protected override int Key
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
170 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
171 get { return OrderID; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
172 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
173 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
174
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
175 [TableName("Products")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
176 [InheritanceMapping(Code=true, Type=typeof(DiscontinuedProduct))]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
177 [InheritanceMapping(Code=false, Type=typeof(ActiveProduct))]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
178 public abstract class Product
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
179 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
180 [PrimaryKey, NonUpdatable] public int ProductID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
181 [NotNull] public string ProductName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
182 public int? SupplierID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
183 public int? CategoryID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
184 public string QuantityPerUnit;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
185 public decimal? UnitPrice;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
186 public short? UnitsInStock;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
187 public short? UnitsOnOrder;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
188 public short? ReorderLevel;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
189 [MapField(IsInheritanceDiscriminator=true)] public bool Discontinued;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
190
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
191 [Association(ThisKey="ProductID", OtherKey="ProductID")] public List<OrderDetail> OrderDetails;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
192 [Association(ThisKey="CategoryID", OtherKey="CategoryID")] public Category Category;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
193 [Association(ThisKey="SupplierID", OtherKey="SupplierID")] public Supplier Supplier;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
194 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
195
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
196 public class ActiveProduct : Product {}
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
197 public class DiscontinuedProduct : Product {}
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
198
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
199 [TableName("Region")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
200 public class Region
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
201 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
202 [PrimaryKey] public int RegionID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
203 [NotNull] public string RegionDescription;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
204
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
205 [Association(ThisKey="RegionID", OtherKey="RegionID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
206 public List<Territory> Territories;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
207 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
208
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
209 [TableName("Shippers")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
210 public class Shipper
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
211 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
212 [PrimaryKey, NonUpdatable] public int ShipperID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
213 [NotNull] public string CompanyName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
214 public string Phone;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
215
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
216 [Association(ThisKey="ShipperID", OtherKey="ShipVia")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
217 public List<Order> Orders;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
218 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
219
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
220 [TableName("Suppliers")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
221 public class Supplier
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
222 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
223 [PrimaryKey, NonUpdatable] public int SupplierID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
224 [NotNull] public string CompanyName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
225 public string ContactName;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
226 public string ContactTitle;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
227 public string Address;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
228 public string City;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
229 public string Region;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
230 public string PostalCode;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
231 public string Country;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
232 public string Phone;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
233 public string Fax;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
234 public string HomePage;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
235
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
236 [Association(ThisKey="SupplierID", OtherKey="SupplierID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
237 public List<Product> Products;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
238 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
239
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
240 [TableName("Territories")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
241 public class Territory
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
242 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
243 [PrimaryKey, NotNull] public string TerritoryID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
244 [NotNull] public string TerritoryDescription;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
245 public int RegionID;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
246
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
247 [Association(ThisKey="TerritoryID", OtherKey="TerritoryID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
248 public List<EmployeeTerritory> EmployeeTerritories;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
249
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
250 [Association(ThisKey="RegionID", OtherKey="RegionID")]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
251 public Region Region;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
252 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
253 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
254 }