forked from dotnet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadventureworksmodel.designer.vb
2794 lines (2470 loc) · 96.9 KB
/
adventureworksmodel.designer.vb
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated from a template.
'
' Manual changes to this file may cause unexpected behavior in your application.
' Manual changes to this file will be overwritten if the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Imports System.Data.Objects
Imports System.Data.Objects.DataClasses
Imports System.Data.EntityClient
Imports System.ComponentModel
Imports System.Xml.Serialization
Imports System.Runtime.Serialization
<Assembly: EdmSchemaAttribute("4ac5b847-ed74-4806-825c-e44572b5493a")>
#Region "EDM Relationship Metadata"
<Assembly: EdmRelationshipAttribute("AdventureWorksModel", "FK_SalesOrderHeader_Address_BillToAddressID", "Address", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Address), "SalesOrderHeader", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(SalesOrderHeader), True)>
<Assembly: EdmRelationshipAttribute("AdventureWorksModel", "FK_SalesOrderHeader_Address_ShipToAddressID", "Address", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Address), "SalesOrderHeader", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(SalesOrderHeader), True)>
<Assembly: EdmRelationshipAttribute("AdventureWorksModel", "FK_SalesOrderHeader_Contact_ContactID", "Contact", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Contact), "SalesOrderHeader", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(SalesOrderHeader), True)>
<Assembly: EdmRelationshipAttribute("AdventureWorksModel", "FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderHeader", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(SalesOrderHeader), "SalesOrderDetail", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(SalesOrderDetail), True)>
#End Region
#Region "Contexts"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public Partial Class AdventureWorksEntities
Inherits ObjectContext
#Region "Constructors"
''' <summary>
''' Initializes a new AdventureWorksEntities object using the connection string found in the 'AdventureWorksEntities' section of the application configuration file.
''' </summary>
Public Sub New()
MyBase.New("name=AdventureWorksEntities", "AdventureWorksEntities")
MyBase.ContextOptions.LazyLoadingEnabled = true
OnContextCreated()
End Sub
''' <summary>
''' Initialize a new AdventureWorksEntities object.
''' </summary>
Public Sub New(ByVal connectionString As String)
MyBase.New(connectionString, "AdventureWorksEntities")
MyBase.ContextOptions.LazyLoadingEnabled = true
OnContextCreated()
End Sub
''' <summary>
''' Initialize a new AdventureWorksEntities object.
''' </summary>
Public Sub New(ByVal connection As EntityConnection)
MyBase.New(connection, "AdventureWorksEntities")
MyBase.ContextOptions.LazyLoadingEnabled = true
OnContextCreated()
End Sub
#End Region
#Region "Partial Methods"
Partial Private Sub OnContextCreated()
End Sub
#End Region
#Region "ObjectSet Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property Addresses() As ObjectSet(Of Address)
Get
If (_Addresses Is Nothing) Then
_Addresses = MyBase.CreateObjectSet(Of Address)("Addresses")
End If
Return _Addresses
End Get
End Property
Private _Addresses As ObjectSet(Of Address)
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property Contacts() As ObjectSet(Of Contact)
Get
If (_Contacts Is Nothing) Then
_Contacts = MyBase.CreateObjectSet(Of Contact)("Contacts")
End If
Return _Contacts
End Get
End Property
Private _Contacts As ObjectSet(Of Contact)
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property Products() As ObjectSet(Of Product)
Get
If (_Products Is Nothing) Then
_Products = MyBase.CreateObjectSet(Of Product)("Products")
End If
Return _Products
End Get
End Property
Private _Products As ObjectSet(Of Product)
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property SalesOrderDetails() As ObjectSet(Of SalesOrderDetail)
Get
If (_SalesOrderDetails Is Nothing) Then
_SalesOrderDetails = MyBase.CreateObjectSet(Of SalesOrderDetail)("SalesOrderDetails")
End If
Return _SalesOrderDetails
End Get
End Property
Private _SalesOrderDetails As ObjectSet(Of SalesOrderDetail)
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property SalesOrderHeaders() As ObjectSet(Of SalesOrderHeader)
Get
If (_SalesOrderHeaders Is Nothing) Then
_SalesOrderHeaders = MyBase.CreateObjectSet(Of SalesOrderHeader)("SalesOrderHeaders")
End If
Return _SalesOrderHeaders
End Get
End Property
Private _SalesOrderHeaders As ObjectSet(Of SalesOrderHeader)
#End Region
#Region "AddTo Methods"
''' <summary>
''' Deprecated Method for adding a new object to the Addresses EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToAddresses(ByVal address As Address)
MyBase.AddObject("Addresses", address)
End Sub
''' <summary>
''' Deprecated Method for adding a new object to the Contacts EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToContacts(ByVal contact As Contact)
MyBase.AddObject("Contacts", contact)
End Sub
''' <summary>
''' Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToProducts(ByVal product As Product)
MyBase.AddObject("Products", product)
End Sub
''' <summary>
''' Deprecated Method for adding a new object to the SalesOrderDetails EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToSalesOrderDetails(ByVal salesOrderDetail As SalesOrderDetail)
MyBase.AddObject("SalesOrderDetails", salesOrderDetail)
End Sub
''' <summary>
''' Deprecated Method for adding a new object to the SalesOrderHeaders EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToSalesOrderHeaders(ByVal salesOrderHeader As SalesOrderHeader)
MyBase.AddObject("SalesOrderHeaders", salesOrderHeader)
End Sub
#End Region
End Class
#End Region
#Region "Entities"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="AdventureWorksModel", Name:="Address")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Address
Inherits EntityObject
#Region "Factory Method"
''' <summary>
''' Create a new Address object.
''' </summary>
''' <param name="addressID">Initial value of the AddressID property.</param>
''' <param name="addressLine1">Initial value of the AddressLine1 property.</param>
''' <param name="city">Initial value of the City property.</param>
''' <param name="stateProvinceID">Initial value of the StateProvinceID property.</param>
''' <param name="postalCode">Initial value of the PostalCode property.</param>
''' <param name="rowguid">Initial value of the rowguid property.</param>
''' <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
Public Shared Function CreateAddress(addressID As Global.System.Int32, addressLine1 As Global.System.String, city As Global.System.String, stateProvinceID As Global.System.Int32, postalCode As Global.System.String, rowguid As Global.System.Guid, modifiedDate As Global.System.DateTime) As Address
Dim address as Address = New Address
address.AddressID = addressID
address.AddressLine1 = addressLine1
address.City = city
address.StateProvinceID = stateProvinceID
address.PostalCode = postalCode
address.rowguid = rowguid
address.ModifiedDate = modifiedDate
Return address
End Function
#End Region
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
<DataMemberAttribute()>
Public Property AddressID() As Global.System.Int32
Get
Return _AddressID
End Get
Set
If (_AddressID <> Value) Then
OnAddressIDChanging(value)
ReportPropertyChanging("AddressID")
_AddressID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("AddressID")
OnAddressIDChanged()
End If
End Set
End Property
Private _AddressID As Global.System.Int32
Private Partial Sub OnAddressIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnAddressIDChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property AddressLine1() As Global.System.String
Get
Return _AddressLine1
End Get
Set
OnAddressLine1Changing(value)
ReportPropertyChanging("AddressLine1")
_AddressLine1 = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("AddressLine1")
OnAddressLine1Changed()
End Set
End Property
Private _AddressLine1 As Global.System.String
Private Partial Sub OnAddressLine1Changing(value As Global.System.String)
End Sub
Private Partial Sub OnAddressLine1Changed()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
<DataMemberAttribute()>
Public Property AddressLine2() As Global.System.String
Get
Return _AddressLine2
End Get
Set
OnAddressLine2Changing(value)
ReportPropertyChanging("AddressLine2")
_AddressLine2 = StructuralObject.SetValidValue(value, true)
ReportPropertyChanged("AddressLine2")
OnAddressLine2Changed()
End Set
End Property
Private _AddressLine2 As Global.System.String
Private Partial Sub OnAddressLine2Changing(value As Global.System.String)
End Sub
Private Partial Sub OnAddressLine2Changed()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property City() As Global.System.String
Get
Return _City
End Get
Set
OnCityChanging(value)
ReportPropertyChanging("City")
_City = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("City")
OnCityChanged()
End Set
End Property
Private _City As Global.System.String
Private Partial Sub OnCityChanging(value As Global.System.String)
End Sub
Private Partial Sub OnCityChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property StateProvinceID() As Global.System.Int32
Get
Return _StateProvinceID
End Get
Set
OnStateProvinceIDChanging(value)
ReportPropertyChanging("StateProvinceID")
_StateProvinceID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("StateProvinceID")
OnStateProvinceIDChanged()
End Set
End Property
Private _StateProvinceID As Global.System.Int32
Private Partial Sub OnStateProvinceIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnStateProvinceIDChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property PostalCode() As Global.System.String
Get
Return _PostalCode
End Get
Set
OnPostalCodeChanging(value)
ReportPropertyChanging("PostalCode")
_PostalCode = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("PostalCode")
OnPostalCodeChanged()
End Set
End Property
Private _PostalCode As Global.System.String
Private Partial Sub OnPostalCodeChanging(value As Global.System.String)
End Sub
Private Partial Sub OnPostalCodeChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property rowguid() As Global.System.Guid
Get
Return _rowguid
End Get
Set
OnrowguidChanging(value)
ReportPropertyChanging("rowguid")
_rowguid = StructuralObject.SetValidValue(value)
ReportPropertyChanged("rowguid")
OnrowguidChanged()
End Set
End Property
Private _rowguid As Global.System.Guid
Private Partial Sub OnrowguidChanging(value As Global.System.Guid)
End Sub
Private Partial Sub OnrowguidChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property ModifiedDate() As Global.System.DateTime
Get
Return _ModifiedDate
End Get
Set
OnModifiedDateChanging(value)
ReportPropertyChanging("ModifiedDate")
_ModifiedDate = StructuralObject.SetValidValue(value)
ReportPropertyChanged("ModifiedDate")
OnModifiedDateChanged()
End Set
End Property
Private _ModifiedDate As Global.System.DateTime
Private Partial Sub OnModifiedDateChanging(value As Global.System.DateTime)
End Sub
Private Partial Sub OnModifiedDateChanged()
End Sub
#End Region
#Region "Navigation Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<XmlIgnoreAttribute()>
<SoapIgnoreAttribute()>
<DataMemberAttribute()>
<EdmRelationshipNavigationPropertyAttribute("AdventureWorksModel", "FK_SalesOrderHeader_Address_BillToAddressID", "SalesOrderHeader")>
Public Property SalesOrderHeaders() As EntityCollection(Of SalesOrderHeader)
Get
Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of SalesOrderHeader)("AdventureWorksModel.FK_SalesOrderHeader_Address_BillToAddressID", "SalesOrderHeader")
End Get
Set
If (Not value Is Nothing)
CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of SalesOrderHeader)("AdventureWorksModel.FK_SalesOrderHeader_Address_BillToAddressID", "SalesOrderHeader", value)
End If
End Set
End Property
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<XmlIgnoreAttribute()>
<SoapIgnoreAttribute()>
<DataMemberAttribute()>
<EdmRelationshipNavigationPropertyAttribute("AdventureWorksModel", "FK_SalesOrderHeader_Address_ShipToAddressID", "SalesOrderHeader")>
Public Property SalesOrderHeaders1() As EntityCollection(Of SalesOrderHeader)
Get
Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of SalesOrderHeader)("AdventureWorksModel.FK_SalesOrderHeader_Address_ShipToAddressID", "SalesOrderHeader")
End Get
Set
If (Not value Is Nothing)
CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of SalesOrderHeader)("AdventureWorksModel.FK_SalesOrderHeader_Address_ShipToAddressID", "SalesOrderHeader", value)
End If
End Set
End Property
#End Region
End Class
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="AdventureWorksModel", Name:="Contact")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Contact
Inherits EntityObject
#Region "Factory Method"
''' <summary>
''' Create a new Contact object.
''' </summary>
''' <param name="contactID">Initial value of the ContactID property.</param>
''' <param name="nameStyle">Initial value of the NameStyle property.</param>
''' <param name="firstName">Initial value of the FirstName property.</param>
''' <param name="lastName">Initial value of the LastName property.</param>
''' <param name="emailPromotion">Initial value of the EmailPromotion property.</param>
''' <param name="passwordHash">Initial value of the PasswordHash property.</param>
''' <param name="passwordSalt">Initial value of the PasswordSalt property.</param>
''' <param name="rowguid">Initial value of the rowguid property.</param>
''' <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
Public Shared Function CreateContact(contactID As Global.System.Int32, nameStyle As Global.System.Boolean, firstName As Global.System.String, lastName As Global.System.String, emailPromotion As Global.System.Int32, passwordHash As Global.System.String, passwordSalt As Global.System.String, rowguid As Global.System.Guid, modifiedDate As Global.System.DateTime) As Contact
Dim contact as Contact = New Contact
contact.ContactID = contactID
contact.NameStyle = nameStyle
contact.FirstName = firstName
contact.LastName = lastName
contact.EmailPromotion = emailPromotion
contact.PasswordHash = passwordHash
contact.PasswordSalt = passwordSalt
contact.rowguid = rowguid
contact.ModifiedDate = modifiedDate
Return contact
End Function
#End Region
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
<DataMemberAttribute()>
Public Property ContactID() As Global.System.Int32
Get
Return _ContactID
End Get
Set
If (_ContactID <> Value) Then
OnContactIDChanging(value)
ReportPropertyChanging("ContactID")
_ContactID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("ContactID")
OnContactIDChanged()
End If
End Set
End Property
Private _ContactID As Global.System.Int32
Private Partial Sub OnContactIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnContactIDChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property NameStyle() As Global.System.Boolean
Get
Return _NameStyle
End Get
Set
OnNameStyleChanging(value)
ReportPropertyChanging("NameStyle")
_NameStyle = StructuralObject.SetValidValue(value)
ReportPropertyChanged("NameStyle")
OnNameStyleChanged()
End Set
End Property
Private _NameStyle As Global.System.Boolean
Private Partial Sub OnNameStyleChanging(value As Global.System.Boolean)
End Sub
Private Partial Sub OnNameStyleChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
<DataMemberAttribute()>
Public Property Title() As Global.System.String
Get
Return _Title
End Get
Set
OnTitleChanging(value)
ReportPropertyChanging("Title")
_Title = StructuralObject.SetValidValue(value, true)
ReportPropertyChanged("Title")
OnTitleChanged()
End Set
End Property
Private _Title As Global.System.String
Private Partial Sub OnTitleChanging(value As Global.System.String)
End Sub
Private Partial Sub OnTitleChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property FirstName() As Global.System.String
Get
Return _FirstName
End Get
Set
OnFirstNameChanging(value)
ReportPropertyChanging("FirstName")
_FirstName = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("FirstName")
OnFirstNameChanged()
End Set
End Property
Private _FirstName As Global.System.String
Private Partial Sub OnFirstNameChanging(value As Global.System.String)
End Sub
Private Partial Sub OnFirstNameChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
<DataMemberAttribute()>
Public Property MiddleName() As Global.System.String
Get
Return _MiddleName
End Get
Set
OnMiddleNameChanging(value)
ReportPropertyChanging("MiddleName")
_MiddleName = StructuralObject.SetValidValue(value, true)
ReportPropertyChanged("MiddleName")
OnMiddleNameChanged()
End Set
End Property
Private _MiddleName As Global.System.String
Private Partial Sub OnMiddleNameChanging(value As Global.System.String)
End Sub
Private Partial Sub OnMiddleNameChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property LastName() As Global.System.String
Get
Return _LastName
End Get
Set
OnLastNameChanging(value)
ReportPropertyChanging("LastName")
_LastName = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("LastName")
OnLastNameChanged()
End Set
End Property
Private _LastName As Global.System.String
Private Partial Sub OnLastNameChanging(value As Global.System.String)
End Sub
Private Partial Sub OnLastNameChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
<DataMemberAttribute()>
Public Property Suffix() As Global.System.String
Get
Return _Suffix
End Get
Set
OnSuffixChanging(value)
ReportPropertyChanging("Suffix")
_Suffix = StructuralObject.SetValidValue(value, true)
ReportPropertyChanged("Suffix")
OnSuffixChanged()
End Set
End Property
Private _Suffix As Global.System.String
Private Partial Sub OnSuffixChanging(value As Global.System.String)
End Sub
Private Partial Sub OnSuffixChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
<DataMemberAttribute()>
Public Property EmailAddress() As Global.System.String
Get
Return _EmailAddress
End Get
Set
OnEmailAddressChanging(value)
ReportPropertyChanging("EmailAddress")
_EmailAddress = StructuralObject.SetValidValue(value, true)
ReportPropertyChanged("EmailAddress")
OnEmailAddressChanged()
End Set
End Property
Private _EmailAddress As Global.System.String
Private Partial Sub OnEmailAddressChanging(value As Global.System.String)
End Sub
Private Partial Sub OnEmailAddressChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property EmailPromotion() As Global.System.Int32
Get
Return _EmailPromotion
End Get
Set
OnEmailPromotionChanging(value)
ReportPropertyChanging("EmailPromotion")
_EmailPromotion = StructuralObject.SetValidValue(value)
ReportPropertyChanged("EmailPromotion")
OnEmailPromotionChanged()
End Set
End Property
Private _EmailPromotion As Global.System.Int32
Private Partial Sub OnEmailPromotionChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnEmailPromotionChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
<DataMemberAttribute()>
Public Property Phone() As Global.System.String
Get
Return _Phone
End Get
Set
OnPhoneChanging(value)
ReportPropertyChanging("Phone")
_Phone = StructuralObject.SetValidValue(value, true)
ReportPropertyChanged("Phone")
OnPhoneChanged()
End Set
End Property
Private _Phone As Global.System.String
Private Partial Sub OnPhoneChanging(value As Global.System.String)
End Sub
Private Partial Sub OnPhoneChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property PasswordHash() As Global.System.String
Get
Return _PasswordHash
End Get
Set
OnPasswordHashChanging(value)
ReportPropertyChanging("PasswordHash")
_PasswordHash = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("PasswordHash")
OnPasswordHashChanged()
End Set
End Property
Private _PasswordHash As Global.System.String
Private Partial Sub OnPasswordHashChanging(value As Global.System.String)
End Sub
Private Partial Sub OnPasswordHashChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property PasswordSalt() As Global.System.String
Get
Return _PasswordSalt
End Get
Set
OnPasswordSaltChanging(value)
ReportPropertyChanging("PasswordSalt")
_PasswordSalt = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("PasswordSalt")
OnPasswordSaltChanged()
End Set
End Property
Private _PasswordSalt As Global.System.String
Private Partial Sub OnPasswordSaltChanging(value As Global.System.String)
End Sub
Private Partial Sub OnPasswordSaltChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
<DataMemberAttribute()>
Public Property AdditionalContactInfo() As Global.System.String
Get
Return _AdditionalContactInfo
End Get
Set
OnAdditionalContactInfoChanging(value)
ReportPropertyChanging("AdditionalContactInfo")
_AdditionalContactInfo = StructuralObject.SetValidValue(value, true)
ReportPropertyChanged("AdditionalContactInfo")
OnAdditionalContactInfoChanged()
End Set
End Property
Private _AdditionalContactInfo As Global.System.String
Private Partial Sub OnAdditionalContactInfoChanging(value As Global.System.String)
End Sub
Private Partial Sub OnAdditionalContactInfoChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property rowguid() As Global.System.Guid
Get
Return _rowguid
End Get
Set
OnrowguidChanging(value)
ReportPropertyChanging("rowguid")
_rowguid = StructuralObject.SetValidValue(value)
ReportPropertyChanged("rowguid")
OnrowguidChanged()
End Set
End Property
Private _rowguid As Global.System.Guid
Private Partial Sub OnrowguidChanging(value As Global.System.Guid)
End Sub
Private Partial Sub OnrowguidChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property ModifiedDate() As Global.System.DateTime
Get
Return _ModifiedDate
End Get
Set
OnModifiedDateChanging(value)
ReportPropertyChanging("ModifiedDate")
_ModifiedDate = StructuralObject.SetValidValue(value)
ReportPropertyChanged("ModifiedDate")
OnModifiedDateChanged()
End Set
End Property
Private _ModifiedDate As Global.System.DateTime
Private Partial Sub OnModifiedDateChanging(value As Global.System.DateTime)
End Sub
Private Partial Sub OnModifiedDateChanged()
End Sub
#End Region
#Region "Navigation Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<XmlIgnoreAttribute()>
<SoapIgnoreAttribute()>
<DataMemberAttribute()>
<EdmRelationshipNavigationPropertyAttribute("AdventureWorksModel", "FK_SalesOrderHeader_Contact_ContactID", "SalesOrderHeader")>
Public Property SalesOrderHeaders() As EntityCollection(Of SalesOrderHeader)
Get
Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of SalesOrderHeader)("AdventureWorksModel.FK_SalesOrderHeader_Contact_ContactID", "SalesOrderHeader")
End Get
Set
If (Not value Is Nothing)
CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of SalesOrderHeader)("AdventureWorksModel.FK_SalesOrderHeader_Contact_ContactID", "SalesOrderHeader", value)
End If
End Set
End Property
#End Region
End Class
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="AdventureWorksModel", Name:="Product")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Product
Inherits EntityObject
#Region "Factory Method"
''' <summary>
''' Create a new Product object.
''' </summary>
''' <param name="productID">Initial value of the ProductID property.</param>
''' <param name="name">Initial value of the Name property.</param>
''' <param name="productNumber">Initial value of the ProductNumber property.</param>
''' <param name="makeFlag">Initial value of the MakeFlag property.</param>
''' <param name="finishedGoodsFlag">Initial value of the FinishedGoodsFlag property.</param>
''' <param name="safetyStockLevel">Initial value of the SafetyStockLevel property.</param>
''' <param name="reorderPoint">Initial value of the ReorderPoint property.</param>
''' <param name="standardCost">Initial value of the StandardCost property.</param>
''' <param name="listPrice">Initial value of the ListPrice property.</param>
''' <param name="daysToManufacture">Initial value of the DaysToManufacture property.</param>
''' <param name="sellStartDate">Initial value of the SellStartDate property.</param>
''' <param name="rowguid">Initial value of the rowguid property.</param>
''' <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
Public Shared Function CreateProduct(productID As Global.System.Int32, name As Global.System.String, productNumber As Global.System.String, makeFlag As Global.System.Boolean, finishedGoodsFlag As Global.System.Boolean, safetyStockLevel As Global.System.Int16, reorderPoint As Global.System.Int16, standardCost As Global.System.Decimal, listPrice As Global.System.Decimal, daysToManufacture As Global.System.Int32, sellStartDate As Global.System.DateTime, rowguid As Global.System.Guid, modifiedDate As Global.System.DateTime) As Product
Dim product as Product = New Product
product.ProductID = productID
product.Name = name
product.ProductNumber = productNumber
product.MakeFlag = makeFlag
product.FinishedGoodsFlag = finishedGoodsFlag
product.SafetyStockLevel = safetyStockLevel
product.ReorderPoint = reorderPoint
product.StandardCost = standardCost
product.ListPrice = listPrice
product.DaysToManufacture = daysToManufacture
product.SellStartDate = sellStartDate
product.rowguid = rowguid
product.ModifiedDate = modifiedDate
Return product
End Function
#End Region
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
<DataMemberAttribute()>
Public Property ProductID() As Global.System.Int32
Get
Return _ProductID
End Get
Set
If (_ProductID <> Value) Then
OnProductIDChanging(value)
ReportPropertyChanging("ProductID")
_ProductID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("ProductID")
OnProductIDChanged()
End If
End Set
End Property
Private _ProductID As Global.System.Int32
Private Partial Sub OnProductIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnProductIDChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property Name() As Global.System.String
Get
Return _Name
End Get
Set
OnNameChanging(value)
ReportPropertyChanging("Name")
_Name = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("Name")
OnNameChanged()
End Set
End Property
Private _Name As Global.System.String