public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new My_Scripture_JournalContext(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <My_Scripture_JournalContext> >()))
            {
                // Look for any scriptures.
                if (context.Scripture.Any())
                {
                    return;   // DB has been seeded
                }

                context.Scripture.AddRange(
                    new Scripture
                {
                    Book      = "Jacob",
                    Chapter   = 6,
                    Verse     = 12,
                    Note      = "What every parent wants their child to remember.",
                    DateAdded = DateTime.Parse("2-18-2020")
                },

                    new Scripture
                {
                    Book      = "1 Nephi",
                    Chapter   = 17,
                    Verse     = 13,
                    Note      = "Favorite Scripture",
                    DateAdded = DateTime.Parse("1-05-2020")
                },

                    new Scripture
                {
                    Book      = "1 Nephi",
                    Chapter   = 3,
                    Verse     = 7,
                    Note      = "Go and do! Don't be lazy!",
                    DateAdded = DateTime.Parse("12-12-2019")
                },

                    new Scripture
                {
                    Book      = "Matthew",
                    Chapter   = 17,
                    Verse     = 7,
                    Note      = "Don't be afraid. Stand up and have courage.",
                    DateAdded = DateTime.Parse("4-20-20")
                }
                    );
                context.SaveChanges();
            }
        }
Exemple #2
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new My_Scripture_JournalContext(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <My_Scripture_JournalContext> >()))
            {
                // Look for any movies.
                if (context.Entry.Any())
                {
                    return; // DB has been seeded
                }

                context.Entry.AddRange(
                    new Entry
                {
                    Book         = "Matthew",
                    Chapter      = 28,
                    Note         = "Missionary work will continue forever.",
                    Verses       = "19-20",
                    StandardWork = "New Testament",
                    DatePosted   = "07/28/1995",
                    Passage      = "Go ye therefore, and teach all nations, baptizing them in the name of the Father, and of the Son, and of the Holy Ghost:Teaching them to observe all things whatsoever I have commanded you: and,lo, I am with you alway, even unto the end of the world.Amen. "
                },
                    new Entry {
                    Book         = "D&C 18",
                    Chapter      = 3,
                    Note         = "Missionary Work is worth it",
                    Verses       = "",
                    StandardWork = "D&C",
                    DatePosted   = "12/25/1987",
                    Passage      = "And if it so be that you should labor all your days in crying repentance unto this people, and bring, save it be one soul unto me, how great shall be your joy with him in the kingdom of my Father! And now, if your joy will be great with one soul that you have brought unto me into the kingdom of my Father, how great will be your joy if you should bring many souls unto me!"
                },

                    new Entry {
                    Book         = "1 Nephi",
                    Chapter      = 3,
                    Note         = "The Lord always provides",
                    Verses       = "7",
                    StandardWork = "Book of Mormon",
                    DatePosted   = "12/03/2003",
                    Passage      = " And it came to pass that I, Nephi, said unto my father: I will go and do the things which the Lord hath commanded, for I know that the Lord giveth no commandments unto the children of men, save he shall prepare a way for them that they may accomplish the thing which he commandeth them."
                }



                    );
                context.SaveChanges();
            }
        }
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new My_Scripture_JournalContext(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <My_Scripture_JournalContext> >()))
            {
                // Look for any scriptures
                if (context.Scripture.Any())
                {
                    return;   // DB has been seeded
                }

                context.Scripture.AddRange(
                    new Scripture
                {
                    NoteTitle = "1 Nephi 3:7",
                    Book      = "1 Nephi",
                    Chapter   = 3,
                    Verse     = 7,
                    Note      = "I can do hard things",
                    Passage   = "And it came to pass that I, Nephi, said unto my father: I will go and do the things which the Lord hath commanded, for I know that the Lord giveth no commandments unto the children of men, save he shall prepare a way for them that they may accomplish the thing which he commandeth them.",
                    DateAdded = DateTime.Parse("2020-5-29")
                },

                    new Scripture
                {
                    NoteTitle = "Jacob 6:12",
                    Book      = "Jacob",
                    Chapter   = 6,
                    Verse     = 12,
                    Note      = "Don't be dumb",
                    Passage   = "O be wise; what can I say more?",
                    DateAdded = DateTime.Parse("2091-10-31")
                },

                    new Scripture
                {
                    NoteTitle = "John 15:14",
                    Book      = "John",
                    Chapter   = 15,
                    Verse     = 14,
                    Note      = "The question is whether or not you will choose to be Christ's friend",
                    Passage   = "Ye are my friends, if ye do whatsoever I command you.",
                    DateAdded = DateTime.Parse("2021-11-1")
                }
                    );
                context.SaveChanges();
            }
        }
Exemple #4
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new My_Scripture_JournalContext(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <My_Scripture_JournalContext> >()))
            {
                // Look for any movies.
                if (context.JournalEntry.Any())
                {
                    return;   // DB has been seeded
                }

                context.JournalEntry.AddRange(
                    new JournalEntry
                {
                    Book = "New Testimate",
                    JournalEntryInput = "This is the seed entry",
                    EntryAdded        = DateTime.Parse("2019-11-02")
                }
                    );
                context.SaveChanges();
            }
        }
Exemple #5
0
 public DeleteModel(My_Scripture_Journal.Models.My_Scripture_JournalContext context)
 {
     _context = context;
 }
 public EditModel(My_Scripture_Journal.Models.My_Scripture_JournalContext context)
 {
     _context = context;
 }