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

                context.Meeting.AddRange(
                    new Meeting
                {
                    MeetingDate   = DateTime.Parse("2019-3-17"),
                    Conducting    = "Bruce Willies",
                    Presiding     = "Bruce Willies",
                    Invocation    = "Mary Jo",
                    Benediction   = "Bruce Lee",
                    OpeningHymn   = 344,
                    SacramentHymn = 134,
                    ClosingHymn   = 235,
                    Speaker1      = "James Rick",
                    Topic1        = "Repenance",
                    Speaker2      = "Betty Jo",
                    Topic2        = "Endure to the end",
                    Speaker3      = "Leslie Brooke",
                    Topic3        = "Prayer"
                },

                    new Meeting
                {
                    MeetingDate   = DateTime.Parse("2019-2-12"),
                    Conducting    = "Bruce Willies",
                    Presiding     = "Bruce Willies",
                    Invocation    = "Mary Jo",
                    Benediction   = "Bruce Lee",
                    OpeningHymn   = 344,
                    SacramentHymn = 134,
                    ClosingHymn   = 235,
                    Speaker1      = "James Rick",
                    Topic1        = "Repenance",
                    Speaker2      = "Betty Jo",
                    Topic2        = "Endure to the end",
                    Speaker3      = "Leslie Brooke",
                    Topic3        = "Prayer"
                }
                    );
                context.SaveChanges();
            }
        }
示例#2
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new SacramentMeetingContext(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <SacramentMeetingContext> >()))
            {
                // Look for any meetings.
                if (context.Meeting.Any())
                {
                    return;   // DB has been seeded
                }

                context.Meeting.AddRange(
                    new Meeting
                {
                    Date          = DateTime.Parse("2018-2-12"),
                    Conductor     = "Bishop Priday",
                    OpeningHymn   = "2 The Spirit of God",
                    SacramentHymn = "169 As Now We Take The Sacrament",
                    ClosingHymn   = "135 My Redeemer Lives",
                    MusicalNumber = "Mary's Lullaby",
                    OpeningPrayer = "Sister Johnson",
                    ClosingPrayer = "Brother Smith"
                },

                    new Meeting
                {
                    Date          = DateTime.Parse("2018-2-19"),
                    Conductor     = "Brother Smith",
                    OpeningHymn   = "27 Praise to the Man",
                    SacramentHymn = "172 In Humility, Our Savior",
                    ClosingHymn   = "3 Now Let Us Rejoice",
                    MusicalNumber = "If You Could Hie To Kolob",
                    OpeningPrayer = "Sister Lawson",
                    ClosingPrayer = "Brother Jameson"
                },

                    new Meeting
                {
                    Date          = DateTime.Parse("2018-3-1"),
                    Conductor     = "Brother Lawson",
                    OpeningHymn   = "5 High on the Mountain Top",
                    SacramentHymn = "180 Father in Heaven, We Do Believe",
                    ClosingHymn   = "30 Come, Come Ye Saints",
                    MusicalNumber = "A Poor Wayfaring Stranger",
                    OpeningPrayer = "Brother Johnson",
                    ClosingPrayer = "Sister Priday"
                },

                    new Meeting
                {
                    Date          = DateTime.Parse("2018-3-8"),
                    Conductor     = "Bishop Priday",
                    OpeningHymn   = "52 The Day Dawn is Breaking",
                    SacramentHymn = "I Stand All Amazed",
                    ClosingHymn   = "6 Redeemer of Israel",
                    MusicalNumber = "Master, the Tempest is Raging",
                    OpeningPrayer = "Sister Jameson",
                    ClosingPrayer = "Brother Lawson"
                }
                    );
                context.SaveChanges();
            }
        }