Exemple #1
0
        public static void Initialize(MeetingsContext context)
        {
            if (context.Meetings.Any())
            {
                return;   // DB has been seeded
            }

            var meetings = new Meeting[]
            {
                new Meeting {
                    ContactName = "Bill Gates", CompanyName = "Microsoft", Email = "*****@*****.**", MobileNumber = 123456789, MeetingDate = DateTime.Parse("2021-01-01"), FollowUpDate = DateTime.Parse("2021-01-15"), FollowUpDone = true, MeetingNotes = "Microsoft 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit."
                },
                new Meeting {
                    ContactName = "Bill Gates", CompanyName = "Microsoft", Email = "*****@*****.**", MobileNumber = 123456789, MeetingDate = DateTime.Parse("2021-02-01"), FollowUpDate = DateTime.Parse("2021-02-15"), FollowUpDone = false, MeetingNotes = "Microsoft 2 Lorem ipsum dolor sit amet, consectetur adipiscing elit."
                },
                new Meeting {
                    ContactName = "Satya Nadella", CompanyName = "Microsoft", Email = "*****@*****.**", MobileNumber = 123456789, MeetingDate = DateTime.Parse("2021-03-01"), FollowUpDate = DateTime.Parse("2021-03-15"), FollowUpDone = false, MeetingNotes = "Microsoft 3 Lorem ipsum dolor sit amet, consectetur adipiscing elit."
                },
                new Meeting {
                    ContactName = "Mark Zuckerberg", CompanyName = "Facebook", Email = "*****@*****.**", MobileNumber = 123456789, MeetingDate = DateTime.Parse("2021-04-01"), FollowUpDate = DateTime.Parse("2021-04-15"), FollowUpDone = true, MeetingNotes = "Facebook 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit."
                }
            };

            context.Meetings.AddRange(meetings);
            context.SaveChanges();
        }
Exemple #2
0
 public CreateModel(POC_Meetings.Data.MeetingsContext context)
 {
     _context = context;
 }
Exemple #3
0
 public EditModel(POC_Meetings.Data.MeetingsContext context)
 {
     _context = context;
 }
Exemple #4
0
 public DetailsModel(POC_Meetings.Data.MeetingsContext context)
 {
     _context = context;
 }