-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathData.vb
More file actions
66 lines (47 loc) · 2.23 KB
/
Data.vb
File metadata and controls
66 lines (47 loc) · 2.23 KB
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
Imports System.Data.Entity
Namespace DXSample.Data
Public Class SchedulingContext
Inherits DbContext
Public Property Appointments As DbSet(Of AppointmentEntity)
Public Property Resources As DbSet(Of ResourceEntity)
End Class
Public Class AppointmentEntity
Public Property Id As Integer
Public Property Subject As String
Public Property Description As String
Public Property Start As Date
Public Property [End] As Date
Public Property AppointmentType As Integer
Public Property RecurrenceInfo As String
Public Property ResourceId As Integer
Public Property Label As Integer
End Class
Public Class ResourceEntity
Public Property Id As Integer
Public Property Description As String
End Class
Public Class SchedulingContextInitializer
Inherits DropCreateDatabaseIfModelChanges(Of SchedulingContext)
Protected Overrides Sub Seed(ByVal context As SchedulingContext)
MyBase.Seed(context)
context.Resources.Add(DataHelper.Personal())
context.Resources.Add(DataHelper.Education())
context.Resources.Add(DataHelper.Work())
context.Appointments.AddRange(DataHelper.Gym())
context.Appointments.Add(DataHelper.Dentist())
context.Appointments.Add(DataHelper.Dinner())
context.Appointments.Add(DataHelper.Disneyland())
context.Appointments.Add(DataHelper.RR())
context.Appointments.Add(DataHelper.DayOff())
context.Appointments.Add(DataHelper.SecondShift())
context.Appointments.Add(DataHelper.ConferenceCompanyMeeting())
context.Appointments.Add(DataHelper.ConferenceCustomerRetentionReview())
context.Appointments.Add(DataHelper.ConferenceDatabaseAndWebsiteReview())
context.Appointments.Add(DataHelper.ConferenceWeeklyMeeting())
context.Appointments.Add(DataHelper.TrainingFrenchLesson())
context.Appointments.Add(DataHelper.TrainingGermanLesson())
context.Appointments.Add(DataHelper.TrainingTrainStaffOnNewRemoteControls())
context.SaveChanges()
End Sub
End Class
End Namespace