Example #1
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new SacrMeetPlannerContext(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <SacrMeetPlannerContext> >()))
            {
                // Look for any movies.
                if (context.Meeting.Any())
                {
                    return;   // DB has been seeded
                }

                context.Meeting.AddRange(
                    new Meeting
                {
                    Date            = DateTime.Parse("1989-2-12"),
                    Conducting      = "Yo solo",
                    Presiding       = "Romantic Comedy",
                    FirstHimnTitle  = "Hello",
                    FirstHimnNum    = 2,
                    FirstPrayer     = "Elias",
                    Subject         = "Prayer",
                    Announcements   = "Marriage",
                    FirstSpeaker    = "Bishop",
                    SecondSpeaker   = "Vos",
                    SecondHimnTitle = "Yo sé",
                    SecondHimnNum   = 43,
                    ThirdSpeaker    = "President",
                    LastHimnTitle   = "No se",
                    LastHimnNum     = 3,
                    LastPrayer      = "Eddie"
                },

                    new Meeting
                {
                    Date            = DateTime.Parse("1989-2-12"),
                    Conducting      = "Yo solo",
                    Presiding       = "Romantic Comedy",
                    FirstHimnTitle  = "Hello",
                    FirstHimnNum    = 2,
                    FirstPrayer     = "Elias",
                    Subject         = "Prayer",
                    Announcements   = "Marriage",
                    FirstSpeaker    = "Bishop",
                    SecondSpeaker   = "Vos",
                    SecondHimnTitle = "Yo sé",
                    SecondHimnNum   = 43,
                    ThirdSpeaker    = "President",
                    LastHimnTitle   = "No se",
                    LastHimnNum     = 3,
                    LastPrayer      = "Eddie"
                }


                    );
                context.SaveChanges();
            }
        }
Example #2
0
 public EditModel(SacrMeetPlanner.Models.SacrMeetPlannerContext context)
 {
     _context = context;
 }
Example #3
0
 public CreateModel(SacrMeetPlanner.Models.SacrMeetPlannerContext context)
 {
     _context = context;
 }
Example #4
0
 public DetailsModel(SacrMeetPlanner.Models.SacrMeetPlannerContext context)
 {
     _context = context;
 }
Example #5
0
 public IndexModel(SacrMeetPlanner.Models.SacrMeetPlannerContext context)
 {
     _context = context;
 }