forked from dotnet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschoolmodel.designer.vb
1327 lines (1171 loc) · 46.3 KB
/
schoolmodel.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("20787ffd-dab5-492d-8753-a02fb3f819a8")>
#Region "EDM Relationship Metadata"
<Assembly: EdmRelationshipAttribute("SchoolModel", "FK_Course_Department", "Department", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Department), "Course", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Course), True)>
<Assembly: EdmRelationshipAttribute("SchoolModel", "FK_StudentGrade_Course", "Course", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Course), "StudentGrade", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(StudentGrade), True)>
<Assembly: EdmRelationshipAttribute("SchoolModel", "FK_OfficeAssignment_Person", "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Person), "OfficeAssignment", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, GetType(OfficeAssignment), True)>
<Assembly: EdmRelationshipAttribute("SchoolModel", "FK_StudentGrade_Student", "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Person), "StudentGrade", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(StudentGrade), True)>
<Assembly: EdmRelationshipAttribute("SchoolModel", "CourseInstructor", "Course", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Course), "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Person))>
#End Region
#Region "Contexts"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public Partial Class SchoolEntities
Inherits ObjectContext
#Region "Constructors"
''' <summary>
''' Initializes a new SchoolEntities object using the connection string found in the 'SchoolEntities' section of the application configuration file.
''' </summary>
Public Sub New()
MyBase.New("name=SchoolEntities", "SchoolEntities")
OnContextCreated()
End Sub
''' <summary>
''' Initialize a new SchoolEntities object.
''' </summary>
Public Sub New(ByVal connectionString As String)
MyBase.New(connectionString, "SchoolEntities")
OnContextCreated()
End Sub
''' <summary>
''' Initialize a new SchoolEntities object.
''' </summary>
Public Sub New(ByVal connection As EntityConnection)
MyBase.New(connection, "SchoolEntities")
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 Courses() As ObjectSet(Of Course)
Get
If (_Courses Is Nothing) Then
_Courses = MyBase.CreateObjectSet(Of Course)("Courses")
End If
Return _Courses
End Get
End Property
Private _Courses As ObjectSet(Of Course)
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property Departments() As ObjectSet(Of Department)
Get
If (_Departments Is Nothing) Then
_Departments = MyBase.CreateObjectSet(Of Department)("Departments")
End If
Return _Departments
End Get
End Property
Private _Departments As ObjectSet(Of Department)
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property OfficeAssignments() As ObjectSet(Of OfficeAssignment)
Get
If (_OfficeAssignments Is Nothing) Then
_OfficeAssignments = MyBase.CreateObjectSet(Of OfficeAssignment)("OfficeAssignments")
End If
Return _OfficeAssignments
End Get
End Property
Private _OfficeAssignments As ObjectSet(Of OfficeAssignment)
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property People() As ObjectSet(Of Person)
Get
If (_People Is Nothing) Then
_People = MyBase.CreateObjectSet(Of Person)("People")
End If
Return _People
End Get
End Property
Private _People As ObjectSet(Of Person)
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public ReadOnly Property StudentGrades() As ObjectSet(Of StudentGrade)
Get
If (_StudentGrades Is Nothing) Then
_StudentGrades = MyBase.CreateObjectSet(Of StudentGrade)("StudentGrades")
End If
Return _StudentGrades
End Get
End Property
Private _StudentGrades As ObjectSet(Of StudentGrade)
#End Region
#Region "AddTo Methods"
''' <summary>
''' Deprecated Method for adding a new object to the Courses EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToCourses(ByVal course As Course)
MyBase.AddObject("Courses", course)
End Sub
''' <summary>
''' Deprecated Method for adding a new object to the Departments EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToDepartments(ByVal department As Department)
MyBase.AddObject("Departments", department)
End Sub
''' <summary>
''' Deprecated Method for adding a new object to the OfficeAssignments EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToOfficeAssignments(ByVal officeAssignment As OfficeAssignment)
MyBase.AddObject("OfficeAssignments", officeAssignment)
End Sub
''' <summary>
''' Deprecated Method for adding a new object to the People EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToPeople(ByVal person As Person)
MyBase.AddObject("People", person)
End Sub
''' <summary>
''' Deprecated Method for adding a new object to the StudentGrades EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
''' </summary>
Public Sub AddToStudentGrades(ByVal studentGrade As StudentGrade)
MyBase.AddObject("StudentGrades", studentGrade)
End Sub
#End Region
#Region "Function Imports"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
''' <param name="studentID">No Metadata Documentation available.</param>
Public Function GetStudentGrades(studentID As Nullable(Of Global.System.Int32)) As ObjectResult(Of StudentGrade)
Dim studentIDParameter As ObjectParameter
If (studentID.HasValue)
studentIDParameter = New ObjectParameter("StudentID", studentID)
Else
studentIDParameter = New ObjectParameter("StudentID", GetType(Global.System.Int32))
End If
Return MyBase.ExecuteFunction(Of StudentGrade)("GetStudentGrades", studentIDParameter)
End Function
''' <summary>
''' No Metadata Documentation available.
''' </summary>
''' <param name="mergeOption"></param>
''' <param name="studentID">No Metadata Documentation available.</param>
Public Function GetStudentGrades(studentID As Nullable(Of Global.System.Int32), mergeOption As MergeOption) As ObjectResult(Of StudentGrade)
Dim studentIDParameter As ObjectParameter
If (studentID.HasValue)
studentIDParameter = New ObjectParameter("StudentID", studentID)
Else
studentIDParameter = New ObjectParameter("StudentID", GetType(Global.System.Int32))
End If
Return MyBase.ExecuteFunction(Of StudentGrade)("GetStudentGrades", mergeOption, studentIDParameter)
End Function
#End Region
End Class
#End Region
#Region "Entities"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="SchoolModel", Name:="Course")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
<KnownTypeAttribute(GetType(OnlineCourse))>
<KnownTypeAttribute(GetType(OnsiteCourse))>
Public MustInherit Partial Class Course
Inherits EntityObject
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
<DataMemberAttribute()>
Public Property CourseID() As Global.System.Int32
Get
Return _CourseID
End Get
Set
If (_CourseID <> Value) Then
OnCourseIDChanging(value)
ReportPropertyChanging("CourseID")
_CourseID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("CourseID")
OnCourseIDChanged()
End If
End Set
End Property
Private _CourseID As Global.System.Int32
Private Partial Sub OnCourseIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnCourseIDChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property Title() As Global.System.String
Get
Return _Title
End Get
Set
OnTitleChanging(value)
ReportPropertyChanging("Title")
_Title = StructuralObject.SetValidValue(value, false)
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 Credits() As Global.System.Int32
Get
Return _Credits
End Get
Set
OnCreditsChanging(value)
ReportPropertyChanging("Credits")
_Credits = StructuralObject.SetValidValue(value)
ReportPropertyChanged("Credits")
OnCreditsChanged()
End Set
End Property
Private _Credits As Global.System.Int32
Private Partial Sub OnCreditsChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnCreditsChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property DepartmentID() As Global.System.Int32
Get
Return _DepartmentID
End Get
Set
OnDepartmentIDChanging(value)
ReportPropertyChanging("DepartmentID")
_DepartmentID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("DepartmentID")
OnDepartmentIDChanged()
End Set
End Property
Private _DepartmentID As Global.System.Int32
Private Partial Sub OnDepartmentIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnDepartmentIDChanged()
End Sub
#End Region
#Region "Navigation Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<XmlIgnoreAttribute()>
<SoapIgnoreAttribute()>
<DataMemberAttribute()>
<EdmRelationshipNavigationPropertyAttribute("SchoolModel", "FK_Course_Department", "Department")>
Public Property Department() As Department
Get
Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Department)("SchoolModel.FK_Course_Department", "Department").Value
End Get
Set
CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Department)("SchoolModel.FK_Course_Department", "Department").Value = value
End Set
End Property
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<BrowsableAttribute(False)>
<DataMemberAttribute()>
Public Property DepartmentReference() As EntityReference(Of Department)
Get
Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Department)("SchoolModel.FK_Course_Department", "Department")
End Get
Set
If (Not value Is Nothing)
CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Department)("SchoolModel.FK_Course_Department", "Department", value)
End If
End Set
End Property
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<XmlIgnoreAttribute()>
<SoapIgnoreAttribute()>
<DataMemberAttribute()>
<EdmRelationshipNavigationPropertyAttribute("SchoolModel", "FK_StudentGrade_Course", "StudentGrade")>
Public Property StudentGrades() As EntityCollection(Of StudentGrade)
Get
Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of StudentGrade)("SchoolModel.FK_StudentGrade_Course", "StudentGrade")
End Get
Set
If (Not value Is Nothing)
CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of StudentGrade)("SchoolModel.FK_StudentGrade_Course", "StudentGrade", value)
End If
End Set
End Property
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<XmlIgnoreAttribute()>
<SoapIgnoreAttribute()>
<DataMemberAttribute()>
<EdmRelationshipNavigationPropertyAttribute("SchoolModel", "CourseInstructor", "Person")>
Public Property People() As EntityCollection(Of Person)
Get
Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Person)("SchoolModel.CourseInstructor", "Person")
End Get
Set
If (Not value Is Nothing)
CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Person)("SchoolModel.CourseInstructor", "Person", value)
End If
End Set
End Property
#End Region
End Class
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="SchoolModel", Name:="Department")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Department
Inherits EntityObject
#Region "Factory Method"
''' <summary>
''' Create a new Department object.
''' </summary>
''' <param name="departmentID">Initial value of the DepartmentID property.</param>
''' <param name="name">Initial value of the Name property.</param>
''' <param name="budget">Initial value of the Budget property.</param>
''' <param name="startDate">Initial value of the StartDate property.</param>
Public Shared Function CreateDepartment(departmentID As Global.System.Int32, name As Global.System.String, budget As Global.System.Decimal, startDate As Global.System.DateTime) As Department
Dim department as Department = New Department
department.DepartmentID = departmentID
department.Name = name
department.Budget = budget
department.StartDate = startDate
Return department
End Function
#End Region
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
<DataMemberAttribute()>
Public Property DepartmentID() As Global.System.Int32
Get
Return _DepartmentID
End Get
Set
If (_DepartmentID <> Value) Then
OnDepartmentIDChanging(value)
ReportPropertyChanging("DepartmentID")
_DepartmentID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("DepartmentID")
OnDepartmentIDChanged()
End If
End Set
End Property
Private _DepartmentID As Global.System.Int32
Private Partial Sub OnDepartmentIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnDepartmentIDChanged()
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
Private Partial Sub OnNameChanging(value As Global.System.String)
End Sub
Private Partial Sub OnNameChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property Budget() As Global.System.Decimal
Get
Return _Budget
End Get
Set
OnBudgetChanging(value)
ReportPropertyChanging("Budget")
_Budget = StructuralObject.SetValidValue(value)
ReportPropertyChanged("Budget")
OnBudgetChanged()
End Set
End Property
Private _Budget As Global.System.Decimal
Private Partial Sub OnBudgetChanging(value As Global.System.Decimal)
End Sub
Private Partial Sub OnBudgetChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property StartDate() As Global.System.DateTime
Get
Return _StartDate
End Get
Set
OnStartDateChanging(value)
ReportPropertyChanging("StartDate")
_StartDate = StructuralObject.SetValidValue(value)
ReportPropertyChanged("StartDate")
OnStartDateChanged()
End Set
End Property
Private _StartDate As Global.System.DateTime
Private Partial Sub OnStartDateChanging(value As Global.System.DateTime)
End Sub
Private Partial Sub OnStartDateChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
<DataMemberAttribute()>
Public Property Administrator() As Nullable(Of Global.System.Int32)
Get
Return _Administrator
End Get
Set
OnAdministratorChanging(value)
ReportPropertyChanging("Administrator")
_Administrator = StructuralObject.SetValidValue(value)
ReportPropertyChanged("Administrator")
OnAdministratorChanged()
End Set
End Property
Private _Administrator As Nullable(Of Global.System.Int32)
Private Partial Sub OnAdministratorChanging(value As Nullable(Of Global.System.Int32))
End Sub
Private Partial Sub OnAdministratorChanged()
End Sub
#End Region
#Region "Navigation Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<XmlIgnoreAttribute()>
<SoapIgnoreAttribute()>
<DataMemberAttribute()>
<EdmRelationshipNavigationPropertyAttribute("SchoolModel", "FK_Course_Department", "Course")>
Public Property Courses() As EntityCollection(Of Course)
Get
Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Course)("SchoolModel.FK_Course_Department", "Course")
End Get
Set
If (Not value Is Nothing)
CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Course)("SchoolModel.FK_Course_Department", "Course", value)
End If
End Set
End Property
#End Region
End Class
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="SchoolModel", Name:="OfficeAssignment")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class OfficeAssignment
Inherits EntityObject
#Region "Factory Method"
''' <summary>
''' Create a new OfficeAssignment object.
''' </summary>
''' <param name="instructorID">Initial value of the InstructorID property.</param>
''' <param name="location">Initial value of the Location property.</param>
''' <param name="timestamp">Initial value of the Timestamp property.</param>
Public Shared Function CreateOfficeAssignment(instructorID As Global.System.Int32, location As Global.System.String, timestamp As Global.System.Byte()) As OfficeAssignment
Dim officeAssignment as OfficeAssignment = New OfficeAssignment
officeAssignment.InstructorID = instructorID
officeAssignment.Location = location
officeAssignment.Timestamp = timestamp
Return officeAssignment
End Function
#End Region
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
<DataMemberAttribute()>
Public Property InstructorID() As Global.System.Int32
Get
Return _InstructorID
End Get
Set
If (_InstructorID <> Value) Then
OnInstructorIDChanging(value)
ReportPropertyChanging("InstructorID")
_InstructorID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("InstructorID")
OnInstructorIDChanged()
End If
End Set
End Property
Private _InstructorID As Global.System.Int32
Private Partial Sub OnInstructorIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnInstructorIDChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property Location() As Global.System.String
Get
Return _Location
End Get
Set
OnLocationChanging(value)
ReportPropertyChanging("Location")
_Location = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("Location")
OnLocationChanged()
End Set
End Property
Private _Location As Global.System.String
Private Partial Sub OnLocationChanging(value As Global.System.String)
End Sub
Private Partial Sub OnLocationChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property Timestamp() As Global.System.Byte()
Get
Return StructuralObject.GetValidValue(_Timestamp)
End Get
Set
OnTimestampChanging(value)
ReportPropertyChanging("Timestamp")
_Timestamp = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("Timestamp")
OnTimestampChanged()
End Set
End Property
Private _Timestamp As Global.System.Byte()
Private Partial Sub OnTimestampChanging(value As Global.System.Byte())
End Sub
Private Partial Sub OnTimestampChanged()
End Sub
#End Region
#Region "Navigation Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<XmlIgnoreAttribute()>
<SoapIgnoreAttribute()>
<DataMemberAttribute()>
<EdmRelationshipNavigationPropertyAttribute("SchoolModel", "FK_OfficeAssignment_Person", "Person")>
Public Property Person() As Person
Get
Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Person)("SchoolModel.FK_OfficeAssignment_Person", "Person").Value
End Get
Set
CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Person)("SchoolModel.FK_OfficeAssignment_Person", "Person").Value = value
End Set
End Property
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<BrowsableAttribute(False)>
<DataMemberAttribute()>
Public Property PersonReference() As EntityReference(Of Person)
Get
Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Person)("SchoolModel.FK_OfficeAssignment_Person", "Person")
End Get
Set
If (Not value Is Nothing)
CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Person)("SchoolModel.FK_OfficeAssignment_Person", "Person", value)
End If
End Set
End Property
#End Region
End Class
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="SchoolModel", Name:="OnlineCourse")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class OnlineCourse
Inherits Course
#Region "Factory Method"
''' <summary>
''' Create a new OnlineCourse object.
''' </summary>
''' <param name="courseID">Initial value of the CourseID property.</param>
''' <param name="title">Initial value of the Title property.</param>
''' <param name="credits">Initial value of the Credits property.</param>
''' <param name="departmentID">Initial value of the DepartmentID property.</param>
''' <param name="uRL">Initial value of the URL property.</param>
Public Shared Function CreateOnlineCourse(courseID As Global.System.Int32, title As Global.System.String, credits As Global.System.Int32, departmentID As Global.System.Int32, uRL As Global.System.String) As OnlineCourse
Dim onlineCourse as OnlineCourse = New OnlineCourse
onlineCourse.CourseID = courseID
onlineCourse.Title = title
onlineCourse.Credits = credits
onlineCourse.DepartmentID = departmentID
onlineCourse.URL = uRL
Return onlineCourse
End Function
#End Region
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property URL() As Global.System.String
Get
Return _URL
End Get
Set
OnURLChanging(value)
ReportPropertyChanging("URL")
_URL = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("URL")
OnURLChanged()
End Set
End Property
Private _URL As Global.System.String
Private Partial Sub OnURLChanging(value As Global.System.String)
End Sub
Private Partial Sub OnURLChanged()
End Sub
#End Region
End Class
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="SchoolModel", Name:="OnsiteCourse")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class OnsiteCourse
Inherits Course
#Region "Factory Method"
''' <summary>
''' Create a new OnsiteCourse object.
''' </summary>
''' <param name="courseID">Initial value of the CourseID property.</param>
''' <param name="title">Initial value of the Title property.</param>
''' <param name="credits">Initial value of the Credits property.</param>
''' <param name="departmentID">Initial value of the DepartmentID property.</param>
''' <param name="location">Initial value of the Location property.</param>
''' <param name="days">Initial value of the Days property.</param>
''' <param name="time">Initial value of the Time property.</param>
Public Shared Function CreateOnsiteCourse(courseID As Global.System.Int32, title As Global.System.String, credits As Global.System.Int32, departmentID As Global.System.Int32, location As Global.System.String, days As Global.System.String, time As Global.System.DateTime) As OnsiteCourse
Dim onsiteCourse as OnsiteCourse = New OnsiteCourse
onsiteCourse.CourseID = courseID
onsiteCourse.Title = title
onsiteCourse.Credits = credits
onsiteCourse.DepartmentID = departmentID
onsiteCourse.Location = location
onsiteCourse.Days = days
onsiteCourse.Time = time
Return onsiteCourse
End Function
#End Region
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property Location() As Global.System.String
Get
Return _Location
End Get
Set
OnLocationChanging(value)
ReportPropertyChanging("Location")
_Location = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("Location")
OnLocationChanged()
End Set
End Property
Private _Location As Global.System.String
Private Partial Sub OnLocationChanging(value As Global.System.String)
End Sub
Private Partial Sub OnLocationChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property Days() As Global.System.String
Get
Return _Days
End Get
Set
OnDaysChanging(value)
ReportPropertyChanging("Days")
_Days = StructuralObject.SetValidValue(value, false)
ReportPropertyChanged("Days")
OnDaysChanged()
End Set
End Property
Private _Days As Global.System.String
Private Partial Sub OnDaysChanging(value As Global.System.String)
End Sub
Private Partial Sub OnDaysChanged()
End Sub
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
<DataMemberAttribute()>
Public Property Time() As Global.System.DateTime
Get
Return _Time
End Get
Set
OnTimeChanging(value)
ReportPropertyChanging("Time")
_Time = StructuralObject.SetValidValue(value)
ReportPropertyChanged("Time")
OnTimeChanged()
End Set
End Property
Private _Time As Global.System.DateTime
Private Partial Sub OnTimeChanging(value As Global.System.DateTime)
End Sub
Private Partial Sub OnTimeChanged()
End Sub
#End Region
End Class
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="SchoolModel", Name:="Person")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Person
Inherits EntityObject
#Region "Factory Method"
''' <summary>
''' Create a new Person object.
''' </summary>
''' <param name="personID">Initial value of the PersonID property.</param>
''' <param name="lastName">Initial value of the LastName property.</param>
''' <param name="firstName">Initial value of the FirstName property.</param>
Public Shared Function CreatePerson(personID As Global.System.Int32, lastName As Global.System.String, firstName As Global.System.String) As Person
Dim person as Person = New Person
person.PersonID = personID
person.LastName = lastName
person.FirstName = firstName
Return person
End Function
#End Region
#Region "Primitive Properties"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
<DataMemberAttribute()>
Public Property PersonID() As Global.System.Int32
Get
Return _PersonID
End Get
Set
If (_PersonID <> Value) Then
OnPersonIDChanging(value)
ReportPropertyChanging("PersonID")
_PersonID = StructuralObject.SetValidValue(value)
ReportPropertyChanged("PersonID")
OnPersonIDChanged()
End If
End Set
End Property
Private _PersonID As Global.System.Int32
Private Partial Sub OnPersonIDChanging(value As Global.System.Int32)
End Sub
Private Partial Sub OnPersonIDChanged()
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:=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)