0
|
1 '---------------------------------------------------------------------------------------------------
|
|
2 ' <auto-generated>
|
|
3 ' This code was generated by BLToolkit template for T4.
|
|
4 ' Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
5 ' </auto-generated>
|
|
6 '---------------------------------------------------------------------------------------------------
|
|
7 Imports System
|
|
8 Imports System.Collections.Generic
|
|
9 Imports System.Linq
|
|
10 Imports System.Linq.Expressions
|
|
11 Imports System.Reflection
|
|
12 Imports System.Runtime.Serialization
|
|
13 Imports System.Text
|
|
14
|
|
15 Imports BLToolkit.Common
|
|
16 Imports BLToolkit.Data
|
|
17 Imports BLToolkit.Data.DataProvider
|
|
18 Imports BLToolkit.Data.Linq
|
|
19 Imports BLToolkit.Data.Sql
|
|
20 Imports BLToolkit.Data.Sql.SqlProvider
|
|
21 Imports BLToolkit.DataAccess
|
|
22 Imports BLToolkit.Mapping
|
|
23
|
|
24 Namespace Templates.VB
|
|
25
|
|
26 Public Partial Class DataModel
|
|
27 Inherits DbManager
|
|
28
|
|
29 Public ReadOnly Property AlphabeticalListOfProducts() As Table(Of AlphabeticalListOfProducts)
|
|
30 Get
|
|
31 Return Me.GetTable(Of AlphabeticalListOfProducts)()
|
|
32 End Get
|
|
33 End Property
|
|
34
|
|
35 Public ReadOnly Property Categories() As Table(Of Categories)
|
|
36 Get
|
|
37 Return Me.GetTable(Of Categories)()
|
|
38 End Get
|
|
39 End Property
|
|
40
|
|
41 Public ReadOnly Property CategorySalesFor1997() As Table(Of CategorySalesFor1997)
|
|
42 Get
|
|
43 Return Me.GetTable(Of CategorySalesFor1997)()
|
|
44 End Get
|
|
45 End Property
|
|
46
|
|
47 Public ReadOnly Property CurrentProductList() As Table(Of CurrentProductList)
|
|
48 Get
|
|
49 Return Me.GetTable(Of CurrentProductList)()
|
|
50 End Get
|
|
51 End Property
|
|
52
|
|
53 Public ReadOnly Property CustomerAndSuppliersByCity() As Table(Of CustomerAndSuppliersByCity)
|
|
54 Get
|
|
55 Return Me.GetTable(Of CustomerAndSuppliersByCity)()
|
|
56 End Get
|
|
57 End Property
|
|
58
|
|
59 Public ReadOnly Property CustomerCustomerDemo() As Table(Of CustomerCustomerDemo)
|
|
60 Get
|
|
61 Return Me.GetTable(Of CustomerCustomerDemo)()
|
|
62 End Get
|
|
63 End Property
|
|
64
|
|
65 Public ReadOnly Property CustomerDemographics() As Table(Of CustomerDemographics)
|
|
66 Get
|
|
67 Return Me.GetTable(Of CustomerDemographics)()
|
|
68 End Get
|
|
69 End Property
|
|
70
|
|
71 Public ReadOnly Property Customers() As Table(Of Customers)
|
|
72 Get
|
|
73 Return Me.GetTable(Of Customers)()
|
|
74 End Get
|
|
75 End Property
|
|
76
|
|
77 Public ReadOnly Property Employees() As Table(Of Employees)
|
|
78 Get
|
|
79 Return Me.GetTable(Of Employees)()
|
|
80 End Get
|
|
81 End Property
|
|
82
|
|
83 Public ReadOnly Property EmployeeTerritories() As Table(Of EmployeeTerritories)
|
|
84 Get
|
|
85 Return Me.GetTable(Of EmployeeTerritories)()
|
|
86 End Get
|
|
87 End Property
|
|
88
|
|
89 Public ReadOnly Property Invoices() As Table(Of Invoices)
|
|
90 Get
|
|
91 Return Me.GetTable(Of Invoices)()
|
|
92 End Get
|
|
93 End Property
|
|
94
|
|
95 Public ReadOnly Property OrderDetails() As Table(Of OrderDetails)
|
|
96 Get
|
|
97 Return Me.GetTable(Of OrderDetails)()
|
|
98 End Get
|
|
99 End Property
|
|
100
|
|
101 Public ReadOnly Property OrderDetailsExtended() As Table(Of OrderDetailsExtended)
|
|
102 Get
|
|
103 Return Me.GetTable(Of OrderDetailsExtended)()
|
|
104 End Get
|
|
105 End Property
|
|
106
|
|
107 Public ReadOnly Property OrderSubtotals() As Table(Of OrderSubtotals)
|
|
108 Get
|
|
109 Return Me.GetTable(Of OrderSubtotals)()
|
|
110 End Get
|
|
111 End Property
|
|
112
|
|
113 Public ReadOnly Property Orders() As Table(Of Orders)
|
|
114 Get
|
|
115 Return Me.GetTable(Of Orders)()
|
|
116 End Get
|
|
117 End Property
|
|
118
|
|
119 Public ReadOnly Property OrdersQry() As Table(Of OrdersQry)
|
|
120 Get
|
|
121 Return Me.GetTable(Of OrdersQry)()
|
|
122 End Get
|
|
123 End Property
|
|
124
|
|
125 Public ReadOnly Property ProductSalesFor1997() As Table(Of ProductSalesFor1997)
|
|
126 Get
|
|
127 Return Me.GetTable(Of ProductSalesFor1997)()
|
|
128 End Get
|
|
129 End Property
|
|
130
|
|
131 Public ReadOnly Property Products() As Table(Of Products)
|
|
132 Get
|
|
133 Return Me.GetTable(Of Products)()
|
|
134 End Get
|
|
135 End Property
|
|
136
|
|
137 Public ReadOnly Property ProductsAboveAveragePrice() As Table(Of ProductsAboveAveragePrice)
|
|
138 Get
|
|
139 Return Me.GetTable(Of ProductsAboveAveragePrice)()
|
|
140 End Get
|
|
141 End Property
|
|
142
|
|
143 Public ReadOnly Property ProductsByCategory() As Table(Of ProductsByCategory)
|
|
144 Get
|
|
145 Return Me.GetTable(Of ProductsByCategory)()
|
|
146 End Get
|
|
147 End Property
|
|
148
|
|
149 Public ReadOnly Property QuarterlyOrders() As Table(Of QuarterlyOrders)
|
|
150 Get
|
|
151 Return Me.GetTable(Of QuarterlyOrders)()
|
|
152 End Get
|
|
153 End Property
|
|
154
|
|
155 Public ReadOnly Property Region() As Table(Of Region)
|
|
156 Get
|
|
157 Return Me.GetTable(Of Region)()
|
|
158 End Get
|
|
159 End Property
|
|
160
|
|
161 Public ReadOnly Property SalesByCategory() As Table(Of SalesByCategory)
|
|
162 Get
|
|
163 Return Me.GetTable(Of SalesByCategory)()
|
|
164 End Get
|
|
165 End Property
|
|
166
|
|
167 Public ReadOnly Property SalesTotalsByAmount() As Table(Of SalesTotalsByAmount)
|
|
168 Get
|
|
169 Return Me.GetTable(Of SalesTotalsByAmount)()
|
|
170 End Get
|
|
171 End Property
|
|
172
|
|
173 Public ReadOnly Property Shippers() As Table(Of Shippers)
|
|
174 Get
|
|
175 Return Me.GetTable(Of Shippers)()
|
|
176 End Get
|
|
177 End Property
|
|
178
|
|
179 Public ReadOnly Property SummaryOfSalesByQuarter() As Table(Of SummaryOfSalesByQuarter)
|
|
180 Get
|
|
181 Return Me.GetTable(Of SummaryOfSalesByQuarter)()
|
|
182 End Get
|
|
183 End Property
|
|
184
|
|
185 Public ReadOnly Property SummaryOfSalesByYear() As Table(Of SummaryOfSalesByYear)
|
|
186 Get
|
|
187 Return Me.GetTable(Of SummaryOfSalesByYear)()
|
|
188 End Get
|
|
189 End Property
|
|
190
|
|
191 Public ReadOnly Property Suppliers() As Table(Of Suppliers)
|
|
192 Get
|
|
193 Return Me.GetTable(Of Suppliers)()
|
|
194 End Get
|
|
195 End Property
|
|
196
|
|
197 Public ReadOnly Property Territories() As Table(Of Territories)
|
|
198 Get
|
|
199 Return Me.GetTable(Of Territories)()
|
|
200 End Get
|
|
201 End Property
|
|
202
|
|
203 End Class
|
|
204
|
|
205 'View
|
|
206 <Serializable(), DataContract()> _
|
|
207 <TableName(Name:="Alphabetical list of products")> _
|
|
208 Partial Public Class AlphabeticalListOfProducts
|
|
209 Inherits EntityBase(Of AlphabeticalListOfProducts)
|
|
210
|
|
211 <DataMember()> _
|
|
212 Public ProductID As Integer
|
|
213
|
|
214 <DataMember()> _
|
|
215 Public ProductName As String
|
|
216
|
|
217 <Nullable(), DataMember()> _
|
|
218 Public SupplierID As Integer?
|
|
219
|
|
220 <Nullable(), DataMember()> _
|
|
221 Public CategoryID As Integer?
|
|
222
|
|
223 <Nullable(), DataMember()> _
|
|
224 Public QuantityPerUnit As String
|
|
225
|
|
226 <Nullable(), DataMember()> _
|
|
227 Public UnitPrice As Decimal?
|
|
228
|
|
229 <Nullable(), DataMember()> _
|
|
230 Public UnitsInStock As Short?
|
|
231
|
|
232 <Nullable(), DataMember()> _
|
|
233 Public UnitsOnOrder As Short?
|
|
234
|
|
235 <Nullable(), DataMember()> _
|
|
236 Public ReorderLevel As Short?
|
|
237
|
|
238 <DataMember()> _
|
|
239 Public Discontinued As Boolean
|
|
240
|
|
241 <DataMember()> _
|
|
242 Public CategoryName As String
|
|
243 End Class
|
|
244
|
|
245 <Serializable(), DataContract()> _
|
|
246 <TableName(Name:="Categories")> _
|
|
247 Partial Public Class Categories
|
|
248 Inherits EntityBase(Of Categories)
|
|
249
|
|
250 <Identity(), PrimaryKey(1), DataMember()> _
|
|
251 Public CategoryID As Integer
|
|
252
|
|
253 <DataMember()> _
|
|
254 Public CategoryName As String
|
|
255
|
|
256 <Nullable(), DataMember()> _
|
|
257 Public Description As String
|
|
258
|
|
259 <Nullable(), DataMember()> _
|
|
260 Public Picture As Byte()
|
|
261
|
|
262 ' FK_Products_Categories_BackReference
|
|
263 <Association(ThisKey:="CategoryID", OtherKey:="CategoryID")> _
|
|
264 Public Productss As IEnumerable(Of Products)
|
|
265 End Class
|
|
266
|
|
267 'View
|
|
268 <Serializable(), DataContract()> _
|
|
269 <TableName(Name:="Category Sales for 1997")> _
|
|
270 Partial Public Class CategorySalesFor1997
|
|
271 Inherits EntityBase(Of CategorySalesFor1997)
|
|
272
|
|
273 <DataMember()> _
|
|
274 Public CategoryName As String
|
|
275
|
|
276 <Nullable(), DataMember()> _
|
|
277 Public CategorySales As Decimal?
|
|
278 End Class
|
|
279
|
|
280 'View
|
|
281 <Serializable(), DataContract()> _
|
|
282 <TableName(Name:="Current Product List")> _
|
|
283 Partial Public Class CurrentProductList
|
|
284 Inherits EntityBase(Of CurrentProductList)
|
|
285
|
|
286 <Identity(), DataMember()> _
|
|
287 Public ProductID As Integer
|
|
288
|
|
289 <DataMember()> _
|
|
290 Public ProductName As String
|
|
291 End Class
|
|
292
|
|
293 'View
|
|
294 <Serializable(), DataContract()> _
|
|
295 <TableName(Name:="Customer and Suppliers by City")> _
|
|
296 Partial Public Class CustomerAndSuppliersByCity
|
|
297 Inherits EntityBase(Of CustomerAndSuppliersByCity)
|
|
298
|
|
299 <Nullable(), DataMember()> _
|
|
300 Public City As String
|
|
301
|
|
302 <DataMember()> _
|
|
303 Public CompanyName As String
|
|
304
|
|
305 <Nullable(), DataMember()> _
|
|
306 Public ContactName As String
|
|
307
|
|
308 <DataMember()> _
|
|
309 Public Relationship As String
|
|
310 End Class
|
|
311
|
|
312 <Serializable(), DataContract()> _
|
|
313 <TableName(Name:="CustomerCustomerDemo")> _
|
|
314 Partial Public Class CustomerCustomerDemo
|
|
315 Inherits EntityBase(Of CustomerCustomerDemo)
|
|
316
|
|
317 <PrimaryKey(1), DataMember()> _
|
|
318 Public CustomerID As String
|
|
319
|
|
320 <PrimaryKey(2), DataMember()> _
|
|
321 Public CustomerTypeID As String
|
|
322
|
|
323 ' FK_CustomerCustomerDemo
|
|
324 <Association(ThisKey:="CustomerTypeID", OtherKey:="CustomerTypeID")> _
|
|
325 Public FK_CustomerCustomerDemo As IEnumerable(Of CustomerDemographics)
|
|
326
|
|
327 ' FK_CustomerCustomerDemo_Customers
|
|
328 <Association(ThisKey:="CustomerID", OtherKey:="CustomerID")> _
|
|
329 Public Customers As IEnumerable(Of Customers)
|
|
330 End Class
|
|
331
|
|
332 <Serializable(), DataContract()> _
|
|
333 <TableName(Name:="CustomerDemographics")> _
|
|
334 Partial Public Class CustomerDemographics
|
|
335 Inherits EntityBase(Of CustomerDemographics)
|
|
336
|
|
337 <PrimaryKey(1), DataMember()> _
|
|
338 Public CustomerTypeID As String
|
|
339
|
|
340 <Nullable(), DataMember()> _
|
|
341 Public CustomerDesc As String
|
|
342
|
|
343 ' FK_CustomerCustomerDemo_BackReference
|
|
344 <Association(ThisKey:="CustomerTypeID", OtherKey:="CustomerTypeID")> _
|
|
345 Public CustomerCustomerDemos As IEnumerable(Of CustomerCustomerDemo)
|
|
346 End Class
|
|
347
|
|
348 <Serializable(), DataContract()> _
|
|
349 <TableName(Name:="Customers")> _
|
|
350 Partial Public Class Customers
|
|
351 Inherits EntityBase(Of Customers)
|
|
352
|
|
353 <PrimaryKey(1), DataMember()> _
|
|
354 Public CustomerID As String
|
|
355
|
|
356 <DataMember()> _
|
|
357 Public CompanyName As String
|
|
358
|
|
359 <Nullable(), DataMember()> _
|
|
360 Public ContactName As String
|
|
361
|
|
362 <Nullable(), DataMember()> _
|
|
363 Public ContactTitle As String
|
|
364
|
|
365 <Nullable(), DataMember()> _
|
|
366 Public Address As String
|
|
367
|
|
368 <Nullable(), DataMember()> _
|
|
369 Public City As String
|
|
370
|
|
371 <Nullable(), DataMember()> _
|
|
372 Public Region As String
|
|
373
|
|
374 <Nullable(), DataMember()> _
|
|
375 Public PostalCode As String
|
|
376
|
|
377 <Nullable(), DataMember()> _
|
|
378 Public Country As String
|
|
379
|
|
380 <Nullable(), DataMember()> _
|
|
381 Public Phone As String
|
|
382
|
|
383 <Nullable(), DataMember()> _
|
|
384 Public Fax As String
|
|
385
|
|
386 ' FK_Orders_Customers_BackReference
|
|
387 <Association(ThisKey:="CustomerID", OtherKey:="CustomerID")> _
|
|
388 Public Orderss As IEnumerable(Of Orders)
|
|
389
|
|
390 ' FK_CustomerCustomerDemo_Customers_BackReference
|
|
391 <Association(ThisKey:="CustomerID", OtherKey:="CustomerID")> _
|
|
392 Public CustomerCustomerDemos As IEnumerable(Of CustomerCustomerDemo)
|
|
393 End Class
|
|
394
|
|
395 <Serializable(), DataContract()> _
|
|
396 <TableName(Name:="Employees")> _
|
|
397 Partial Public Class Employees
|
|
398 Inherits EntityBase(Of Employees)
|
|
399
|
|
400 <Identity(), PrimaryKey(1), DataMember()> _
|
|
401 Public EmployeeID As Integer
|
|
402
|
|
403 <DataMember()> _
|
|
404 Public LastName As String
|
|
405
|
|
406 <DataMember()> _
|
|
407 Public FirstName As String
|
|
408
|
|
409 <Nullable(), DataMember()> _
|
|
410 Public Title As String
|
|
411
|
|
412 <Nullable(), DataMember()> _
|
|
413 Public TitleOfCourtesy As String
|
|
414
|
|
415 <Nullable(), DataMember()> _
|
|
416 Public BirthDate As DateTime?
|
|
417
|
|
418 <Nullable(), DataMember()> _
|
|
419 Public HireDate As DateTime?
|
|
420
|
|
421 <Nullable(), DataMember()> _
|
|
422 Public Address As String
|
|
423
|
|
424 <Nullable(), DataMember()> _
|
|
425 Public City As String
|
|
426
|
|
427 <Nullable(), DataMember()> _
|
|
428 Public Region As String
|
|
429
|
|
430 <Nullable(), DataMember()> _
|
|
431 Public PostalCode As String
|
|
432
|
|
433 <Nullable(), DataMember()> _
|
|
434 Public Country As String
|
|
435
|
|
436 <Nullable(), DataMember()> _
|
|
437 Public HomePhone As String
|
|
438
|
|
439 <Nullable(), DataMember()> _
|
|
440 Public Extension As String
|
|
441
|
|
442 <Nullable(), DataMember()> _
|
|
443 Public Photo As Byte()
|
|
444
|
|
445 <Nullable(), DataMember()> _
|
|
446 Public Notes As String
|
|
447
|
|
448 <Nullable(), DataMember()> _
|
|
449 Public ReportsTo As Integer?
|
|
450
|
|
451 <Nullable(), DataMember()> _
|
|
452 Public PhotoPath As String
|
|
453
|
|
454 ' FK_Employees_Employees
|
|
455 <Association(ThisKey:="ReportsTo", OtherKey:="EmployeeID")> _
|
|
456 Public ReportsToEmployee As IEnumerable(Of Employees)
|
|
457
|
|
458 ' FK_Orders_Employees_BackReference
|
|
459 <Association(ThisKey:="EmployeeID", OtherKey:="EmployeeID")> _
|
|
460 Public Orderss As IEnumerable(Of Orders)
|
|
461
|
|
462 ' FK_EmployeeTerritories_Employees_BackReference
|
|
463 <Association(ThisKey:="EmployeeID", OtherKey:="EmployeeID")> _
|
|
464 Public EmployeeTerritoriess As IEnumerable(Of EmployeeTerritories)
|
|
465
|
|
466 ' FK_Employees_Employees_BackReference
|
|
467 <Association(ThisKey:="EmployeeID", OtherKey:="ReportsTo")> _
|
|
468 Public FK_Employees_Employees_BackReference As IEnumerable(Of Employees)
|
|
469 End Class
|
|
470
|
|
471 <Serializable(), DataContract()> _
|
|
472 <TableName(Name:="EmployeeTerritories")> _
|
|
473 Partial Public Class EmployeeTerritories
|
|
474 Inherits EntityBase(Of EmployeeTerritories)
|
|
475
|
|
476 <PrimaryKey(1), DataMember()> _
|
|
477 Public EmployeeID As Integer
|
|
478
|
|
479 <PrimaryKey(2), DataMember()> _
|
|
480 Public TerritoryID As String
|
|
481
|
|
482 ' FK_EmployeeTerritories_Employees
|
|
483 <Association(ThisKey:="EmployeeID", OtherKey:="EmployeeID")> _
|
|
484 Public Employees As IEnumerable(Of Employees)
|
|
485
|
|
486 ' FK_EmployeeTerritories_Territories
|
|
487 <Association(ThisKey:="TerritoryID", OtherKey:="TerritoryID")> _
|
|
488 Public Territories As IEnumerable(Of Territories)
|
|
489 End Class
|
|
490
|
|
491 'View
|
|
492 <Serializable(), DataContract()> _
|
|
493 <TableName(Name:="Invoices")> _
|
|
494 Partial Public Class Invoices
|
|
495 Inherits EntityBase(Of Invoices)
|
|
496
|
|
497 <Nullable(), DataMember()> _
|
|
498 Public ShipName As String
|
|
499
|
|
500 <Nullable(), DataMember()> _
|
|
501 Public ShipAddress As String
|
|
502
|
|
503 <Nullable(), DataMember()> _
|
|
504 Public ShipCity As String
|
|
505
|
|
506 <Nullable(), DataMember()> _
|
|
507 Public ShipRegion As String
|
|
508
|
|
509 <Nullable(), DataMember()> _
|
|
510 Public ShipPostalCode As String
|
|
511
|
|
512 <Nullable(), DataMember()> _
|
|
513 Public ShipCountry As String
|
|
514
|
|
515 <Nullable(), DataMember()> _
|
|
516 Public CustomerID As String
|
|
517
|
|
518 <DataMember()> _
|
|
519 Public CustomerName As String
|
|
520
|
|
521 <Nullable(), DataMember()> _
|
|
522 Public Address As String
|
|
523
|
|
524 <Nullable(), DataMember()> _
|
|
525 Public City As String
|
|
526
|
|
527 <Nullable(), DataMember()> _
|
|
528 Public Region As String
|
|
529
|
|
530 <Nullable(), DataMember()> _
|
|
531 Public PostalCode As String
|
|
532
|
|
533 <Nullable(), DataMember()> _
|
|
534 Public Country As String
|
|
535
|
|
536 <DataMember()> _
|
|
537 Public Salesperson As String
|
|
538
|
|
539 <DataMember()> _
|
|
540 Public OrderID As Integer
|
|
541
|
|
542 <Nullable(), DataMember()> _
|
|
543 Public OrderDate As DateTime?
|
|
544
|
|
545 <Nullable(), DataMember()> _
|
|
546 Public RequiredDate As DateTime?
|
|
547
|
|
548 <Nullable(), DataMember()> _
|
|
549 Public ShippedDate As DateTime?
|
|
550
|
|
551 <DataMember()> _
|
|
552 Public ShipperName As String
|
|
553
|
|
554 <DataMember()> _
|
|
555 Public ProductID As Integer
|
|
556
|
|
557 <DataMember()> _
|
|
558 Public ProductName As String
|
|
559
|
|
560 <DataMember()> _
|
|
561 Public UnitPrice As Decimal
|
|
562
|
|
563 <DataMember()> _
|
|
564 Public Quantity As Short
|
|
565
|
|
566 <DataMember()> _
|
|
567 Public Discount As Single
|
|
568
|
|
569 <Nullable(), DataMember()> _
|
|
570 Public ExtendedPrice As Decimal?
|
|
571
|
|
572 <Nullable(), DataMember()> _
|
|
573 Public Freight As Decimal?
|
|
574 End Class
|
|
575
|
|
576 <Serializable(), DataContract()> _
|
|
577 <TableName(Name:="Order Details")> _
|
|
578 Partial Public Class OrderDetails
|
|
579 Inherits EntityBase(Of OrderDetails)
|
|
580
|
|
581 <PrimaryKey(1), DataMember()> _
|
|
582 Public OrderID As Integer
|
|
583
|
|
584 <PrimaryKey(2), DataMember()> _
|
|
585 Public ProductID As Integer
|
|
586
|
|
587 <DataMember()> _
|
|
588 Public UnitPrice As Decimal
|
|
589
|
|
590 <DataMember()> _
|
|
591 Public Quantity As Short
|
|
592
|
|
593 <DataMember()> _
|
|
594 Public Discount As Single
|
|
595
|
|
596 ' FK_Order_Details_Orders
|
|
597 <Association(ThisKey:="OrderID", OtherKey:="OrderID")> _
|
|
598 Public OrderDetailsOrders As IEnumerable(Of Orders)
|
|
599
|
|
600 ' FK_Order_Details_Products
|
|
601 <Association(ThisKey:="ProductID", OtherKey:="ProductID")> _
|
|
602 Public OrderDetailsProducts As IEnumerable(Of Products)
|
|
603 End Class
|
|
604
|
|
605 'View
|
|
606 <Serializable(), DataContract()> _
|
|
607 <TableName(Name:="Order Details Extended")> _
|
|
608 Partial Public Class OrderDetailsExtended
|
|
609 Inherits EntityBase(Of OrderDetailsExtended)
|
|
610
|
|
611 <DataMember()> _
|
|
612 Public OrderID As Integer
|
|
613
|
|
614 <DataMember()> _
|
|
615 Public ProductID As Integer
|
|
616
|
|
617 <DataMember()> _
|
|
618 Public ProductName As String
|
|
619
|
|
620 <DataMember()> _
|
|
621 Public UnitPrice As Decimal
|
|
622
|
|
623 <DataMember()> _
|
|
624 Public Quantity As Short
|
|
625
|
|
626 <DataMember()> _
|
|
627 Public Discount As Single
|
|
628
|
|
629 <Nullable(), DataMember()> _
|
|
630 Public ExtendedPrice As Decimal?
|
|
631 End Class
|
|
632
|
|
633 'View
|
|
634 <Serializable(), DataContract()> _
|
|
635 <TableName(Name:="Order Subtotals")> _
|
|
636 Partial Public Class OrderSubtotals
|
|
637 Inherits EntityBase(Of OrderSubtotals)
|
|
638
|
|
639 <DataMember()> _
|
|
640 Public OrderID As Integer
|
|
641
|
|
642 <Nullable(), DataMember()> _
|
|
643 Public Subtotal As Decimal?
|
|
644 End Class
|
|
645
|
|
646 <Serializable(), DataContract()> _
|
|
647 <TableName(Name:="Orders")> _
|
|
648 Partial Public Class Orders
|
|
649 Inherits EntityBase(Of Orders)
|
|
650
|
|
651 <Identity(), PrimaryKey(1), DataMember()> _
|
|
652 Public OrderID As Integer
|
|
653
|
|
654 <Nullable(), DataMember()> _
|
|
655 Public CustomerID As String
|
|
656
|
|
657 <Nullable(), DataMember()> _
|
|
658 Public EmployeeID As Integer?
|
|
659
|
|
660 <Nullable(), DataMember()> _
|
|
661 Public OrderDate As DateTime?
|
|
662
|
|
663 <Nullable(), DataMember()> _
|
|
664 Public RequiredDate As DateTime?
|
|
665
|
|
666 <Nullable(), DataMember()> _
|
|
667 Public ShippedDate As DateTime?
|
|
668
|
|
669 <Nullable(), DataMember()> _
|
|
670 Public ShipVia As Integer?
|
|
671
|
|
672 <Nullable(), DataMember()> _
|
|
673 Public Freight As Decimal?
|
|
674
|
|
675 <Nullable(), DataMember()> _
|
|
676 Public ShipName As String
|
|
677
|
|
678 <Nullable(), DataMember()> _
|
|
679 Public ShipAddress As String
|
|
680
|
|
681 <Nullable(), DataMember()> _
|
|
682 Public ShipCity As String
|
|
683
|
|
684 <Nullable(), DataMember()> _
|
|
685 Public ShipRegion As String
|
|
686
|
|
687 <Nullable(), DataMember()> _
|
|
688 Public ShipPostalCode As String
|
|
689
|
|
690 <Nullable(), DataMember()> _
|
|
691 Public ShipCountry As String
|
|
692
|
|
693 ' FK_Orders_Customers
|
|
694 <Association(ThisKey:="CustomerID", OtherKey:="CustomerID")> _
|
|
695 Public Customers As IEnumerable(Of Customers)
|
|
696
|
|
697 ' FK_Orders_Employees
|
|
698 <Association(ThisKey:="EmployeeID", OtherKey:="EmployeeID")> _
|
|
699 Public Employees As IEnumerable(Of Employees)
|
|
700
|
|
701 ' FK_Orders_Shippers
|
|
702 <Association(ThisKey:="ShipVia", OtherKey:="ShipperID")> _
|
|
703 Public Shippers As IEnumerable(Of Shippers)
|
|
704
|
|
705 ' FK_Order_Details_Orders_BackReference
|
|
706 <Association(ThisKey:="OrderID", OtherKey:="OrderID")> _
|
|
707 Public OrderDetailss As IEnumerable(Of OrderDetails)
|
|
708 End Class
|
|
709
|
|
710 'View
|
|
711 <Serializable(), DataContract()> _
|
|
712 <TableName(Name:="Orders Qry")> _
|
|
713 Partial Public Class OrdersQry
|
|
714 Inherits EntityBase(Of OrdersQry)
|
|
715
|
|
716 <DataMember()> _
|
|
717 Public OrderID As Integer
|
|
718
|
|
719 <Nullable(), DataMember()> _
|
|
720 Public CustomerID As String
|
|
721
|
|
722 <Nullable(), DataMember()> _
|
|
723 Public EmployeeID As Integer?
|
|
724
|
|
725 <Nullable(), DataMember()> _
|
|
726 Public OrderDate As DateTime?
|
|
727
|
|
728 <Nullable(), DataMember()> _
|
|
729 Public RequiredDate As DateTime?
|
|
730
|
|
731 <Nullable(), DataMember()> _
|
|
732 Public ShippedDate As DateTime?
|
|
733
|
|
734 <Nullable(), DataMember()> _
|
|
735 Public ShipVia As Integer?
|
|
736
|
|
737 <Nullable(), DataMember()> _
|
|
738 Public Freight As Decimal?
|
|
739
|
|
740 <Nullable(), DataMember()> _
|
|
741 Public ShipName As String
|
|
742
|
|
743 <Nullable(), DataMember()> _
|
|
744 Public ShipAddress As String
|
|
745
|
|
746 <Nullable(), DataMember()> _
|
|
747 Public ShipCity As String
|
|
748
|
|
749 <Nullable(), DataMember()> _
|
|
750 Public ShipRegion As String
|
|
751
|
|
752 <Nullable(), DataMember()> _
|
|
753 Public ShipPostalCode As String
|
|
754
|
|
755 <Nullable(), DataMember()> _
|
|
756 Public ShipCountry As String
|
|
757
|
|
758 <DataMember()> _
|
|
759 Public CompanyName As String
|
|
760
|
|
761 <Nullable(), DataMember()> _
|
|
762 Public Address As String
|
|
763
|
|
764 <Nullable(), DataMember()> _
|
|
765 Public City As String
|
|
766
|
|
767 <Nullable(), DataMember()> _
|
|
768 Public Region As String
|
|
769
|
|
770 <Nullable(), DataMember()> _
|
|
771 Public PostalCode As String
|
|
772
|
|
773 <Nullable(), DataMember()> _
|
|
774 Public Country As String
|
|
775 End Class
|
|
776
|
|
777 'View
|
|
778 <Serializable(), DataContract()> _
|
|
779 <TableName(Name:="Product Sales for 1997")> _
|
|
780 Partial Public Class ProductSalesFor1997
|
|
781 Inherits EntityBase(Of ProductSalesFor1997)
|
|
782
|
|
783 <DataMember()> _
|
|
784 Public CategoryName As String
|
|
785
|
|
786 <DataMember()> _
|
|
787 Public ProductName As String
|
|
788
|
|
789 <Nullable(), DataMember()> _
|
|
790 Public ProductSales As Decimal?
|
|
791 End Class
|
|
792
|
|
793 <Serializable(), DataContract()> _
|
|
794 <TableName(Name:="Products")> _
|
|
795 Partial Public Class Products
|
|
796 Inherits EntityBase(Of Products)
|
|
797
|
|
798 <Identity(), PrimaryKey(1), DataMember()> _
|
|
799 Public ProductID As Integer
|
|
800
|
|
801 <DataMember()> _
|
|
802 Public ProductName As String
|
|
803
|
|
804 <Nullable(), DataMember()> _
|
|
805 Public SupplierID As Integer?
|
|
806
|
|
807 <Nullable(), DataMember()> _
|
|
808 Public CategoryID As Integer?
|
|
809
|
|
810 <Nullable(), DataMember()> _
|
|
811 Public QuantityPerUnit As String
|
|
812
|
|
813 <Nullable(), DataMember()> _
|
|
814 Public UnitPrice As Decimal?
|
|
815
|
|
816 <Nullable(), DataMember()> _
|
|
817 Public UnitsInStock As Short?
|
|
818
|
|
819 <Nullable(), DataMember()> _
|
|
820 Public UnitsOnOrder As Short?
|
|
821
|
|
822 <Nullable(), DataMember()> _
|
|
823 Public ReorderLevel As Short?
|
|
824
|
|
825 <DataMember()> _
|
|
826 Public Discontinued As Boolean
|
|
827
|
|
828 ' FK_Products_Categories
|
|
829 <Association(ThisKey:="CategoryID", OtherKey:="CategoryID")> _
|
|
830 Public Categories As IEnumerable(Of Categories)
|
|
831
|
|
832 ' FK_Products_Suppliers
|
|
833 <Association(ThisKey:="SupplierID", OtherKey:="SupplierID")> _
|
|
834 Public Suppliers As IEnumerable(Of Suppliers)
|
|
835
|
|
836 ' FK_Order_Details_Products_BackReference
|
|
837 <Association(ThisKey:="ProductID", OtherKey:="ProductID")> _
|
|
838 Public OrderDetailss As IEnumerable(Of OrderDetails)
|
|
839 End Class
|
|
840
|
|
841 'View
|
|
842 <Serializable(), DataContract()> _
|
|
843 <TableName(Name:="Products Above Average Price")> _
|
|
844 Partial Public Class ProductsAboveAveragePrice
|
|
845 Inherits EntityBase(Of ProductsAboveAveragePrice)
|
|
846
|
|
847 <DataMember()> _
|
|
848 Public ProductName As String
|
|
849
|
|
850 <Nullable(), DataMember()> _
|
|
851 Public UnitPrice As Decimal?
|
|
852 End Class
|
|
853
|
|
854 'View
|
|
855 <Serializable(), DataContract()> _
|
|
856 <TableName(Name:="Products by Category")> _
|
|
857 Partial Public Class ProductsByCategory
|
|
858 Inherits EntityBase(Of ProductsByCategory)
|
|
859
|
|
860 <DataMember()> _
|
|
861 Public CategoryName As String
|
|
862
|
|
863 <DataMember()> _
|
|
864 Public ProductName As String
|
|
865
|
|
866 <Nullable(), DataMember()> _
|
|
867 Public QuantityPerUnit As String
|
|
868
|
|
869 <Nullable(), DataMember()> _
|
|
870 Public UnitsInStock As Short?
|
|
871
|
|
872 <DataMember()> _
|
|
873 Public Discontinued As Boolean
|
|
874 End Class
|
|
875
|
|
876 'View
|
|
877 <Serializable(), DataContract()> _
|
|
878 <TableName(Name:="Quarterly Orders")> _
|
|
879 Partial Public Class QuarterlyOrders
|
|
880 Inherits EntityBase(Of QuarterlyOrders)
|
|
881
|
|
882 <Nullable(), DataMember()> _
|
|
883 Public CustomerID As String
|
|
884
|
|
885 <Nullable(), DataMember()> _
|
|
886 Public CompanyName As String
|
|
887
|
|
888 <Nullable(), DataMember()> _
|
|
889 Public City As String
|
|
890
|
|
891 <Nullable(), DataMember()> _
|
|
892 Public Country As String
|
|
893 End Class
|
|
894
|
|
895 <Serializable(), DataContract()> _
|
|
896 <TableName(Name:="Region")> _
|
|
897 Partial Public Class Region
|
|
898 Inherits EntityBase(Of Region)
|
|
899
|
|
900 <MapField("RegionID"), PrimaryKey(1), DataMember()> _
|
|
901 Public ID As Integer
|
|
902
|
|
903 <DataMember()> _
|
|
904 Public RegionDescription As String
|
|
905
|
|
906 ' FK_Territories_Region_BackReference
|
|
907 <Association(ThisKey:="ID", OtherKey:="RegionID")> _
|
|
908 Public Territoriess As IEnumerable(Of Territories)
|
|
909 End Class
|
|
910
|
|
911 'View
|
|
912 <Serializable(), DataContract()> _
|
|
913 <TableName(Name:="Sales by Category")> _
|
|
914 Partial Public Class SalesByCategory
|
|
915 Inherits EntityBase(Of SalesByCategory)
|
|
916
|
|
917 <DataMember()> _
|
|
918 Public CategoryID As Integer
|
|
919
|
|
920 <DataMember()> _
|
|
921 Public CategoryName As String
|
|
922
|
|
923 <DataMember()> _
|
|
924 Public ProductName As String
|
|
925
|
|
926 <Nullable(), DataMember()> _
|
|
927 Public ProductSales As Decimal?
|
|
928 End Class
|
|
929
|
|
930 'View
|
|
931 <Serializable(), DataContract()> _
|
|
932 <TableName(Name:="Sales Totals by Amount")> _
|
|
933 Partial Public Class SalesTotalsByAmount
|
|
934 Inherits EntityBase(Of SalesTotalsByAmount)
|
|
935
|
|
936 <Nullable(), DataMember()> _
|
|
937 Public SaleAmount As Decimal?
|
|
938
|
|
939 <DataMember()> _
|
|
940 Public OrderID As Integer
|
|
941
|
|
942 <DataMember()> _
|
|
943 Public CompanyName As String
|
|
944
|
|
945 <Nullable(), DataMember()> _
|
|
946 Public ShippedDate As DateTime?
|
|
947 End Class
|
|
948
|
|
949 <Serializable(), DataContract()> _
|
|
950 <TableName(Name:="Shippers")> _
|
|
951 Partial Public Class Shippers
|
|
952 Inherits EntityBase(Of Shippers)
|
|
953
|
|
954 <Identity(), PrimaryKey(1), DataMember()> _
|
|
955 Public ShipperID As Integer
|
|
956
|
|
957 <DataMember()> _
|
|
958 Public CompanyName As String
|
|
959
|
|
960 <Nullable(), DataMember()> _
|
|
961 Public Phone As String
|
|
962
|
|
963 ' FK_Orders_Shippers_BackReference
|
|
964 <Association(ThisKey:="ShipperID", OtherKey:="ShipVia")> _
|
|
965 Public Orderss As IEnumerable(Of Orders)
|
|
966 End Class
|
|
967
|
|
968 'View
|
|
969 <Serializable(), DataContract()> _
|
|
970 <TableName(Name:="Summary of Sales by Quarter")> _
|
|
971 Partial Public Class SummaryOfSalesByQuarter
|
|
972 Inherits EntityBase(Of SummaryOfSalesByQuarter)
|
|
973
|
|
974 <Nullable(), DataMember()> _
|
|
975 Public ShippedDate As DateTime?
|
|
976
|
|
977 <DataMember()> _
|
|
978 Public OrderID As Integer
|
|
979
|
|
980 <Nullable(), DataMember()> _
|
|
981 Public Subtotal As Decimal?
|
|
982 End Class
|
|
983
|
|
984 'View
|
|
985 <Serializable(), DataContract()> _
|
|
986 <TableName(Name:="Summary of Sales by Year")> _
|
|
987 Partial Public Class SummaryOfSalesByYear
|
|
988 Inherits EntityBase(Of SummaryOfSalesByYear)
|
|
989
|
|
990 <Nullable(), DataMember()> _
|
|
991 Public ShippedDate As DateTime?
|
|
992
|
|
993 <DataMember()> _
|
|
994 Public OrderID As Integer
|
|
995
|
|
996 <Nullable(), DataMember()> _
|
|
997 Public Subtotal As Decimal?
|
|
998 End Class
|
|
999
|
|
1000 <Serializable(), DataContract()> _
|
|
1001 <TableName(Name:="Suppliers")> _
|
|
1002 Partial Public Class Suppliers
|
|
1003 Inherits EntityBase(Of Suppliers)
|
|
1004
|
|
1005 <Identity(), PrimaryKey(1), DataMember()> _
|
|
1006 Public SupplierID As Integer
|
|
1007
|
|
1008 <DataMember()> _
|
|
1009 Public CompanyName As String
|
|
1010
|
|
1011 <Nullable(), DataMember()> _
|
|
1012 Public ContactName As String
|
|
1013
|
|
1014 <Nullable(), DataMember()> _
|
|
1015 Public ContactTitle As String
|
|
1016
|
|
1017 <Nullable(), DataMember()> _
|
|
1018 Public Address As String
|
|
1019
|
|
1020 <Nullable(), DataMember()> _
|
|
1021 Public City As String
|
|
1022
|
|
1023 <Nullable(), DataMember()> _
|
|
1024 Public Region As String
|
|
1025
|
|
1026 <Nullable(), DataMember()> _
|
|
1027 Public PostalCode As String
|
|
1028
|
|
1029 <Nullable(), DataMember()> _
|
|
1030 Public Country As String
|
|
1031
|
|
1032 <Nullable(), DataMember()> _
|
|
1033 Public Phone As String
|
|
1034
|
|
1035 <Nullable(), DataMember()> _
|
|
1036 Public Fax As String
|
|
1037
|
|
1038 <Nullable(), DataMember()> _
|
|
1039 Public HomePage As String
|
|
1040
|
|
1041 ' FK_Products_Suppliers_BackReference
|
|
1042 <Association(ThisKey:="SupplierID", OtherKey:="SupplierID")> _
|
|
1043 Public Productss As IEnumerable(Of Products)
|
|
1044 End Class
|
|
1045
|
|
1046 <Serializable(), DataContract()> _
|
|
1047 <TableName(Name:="Territories")> _
|
|
1048 Partial Public Class Territories
|
|
1049 Inherits EntityBase(Of Territories)
|
|
1050
|
|
1051 <PrimaryKey(1), DataMember()> _
|
|
1052 Public TerritoryID As String
|
|
1053
|
|
1054 <DataMember()> _
|
|
1055 Public TerritoryDescription As String
|
|
1056
|
|
1057 <DataMember()> _
|
|
1058 Public RegionID As Integer
|
|
1059
|
|
1060 ' FK_Territories_Region
|
|
1061 <Association(ThisKey:="RegionID", OtherKey:="ID")> _
|
|
1062 Public Region As IEnumerable(Of Region)
|
|
1063
|
|
1064 ' FK_EmployeeTerritories_Territories_BackReference
|
|
1065 <Association(ThisKey:="TerritoryID", OtherKey:="TerritoryID")> _
|
|
1066 Public EmployeeTerritoriess As IEnumerable(Of EmployeeTerritories)
|
|
1067 End Class
|
|
1068
|
|
1069 End Namespace
|