public static void LoadSampleData()
        {
            using (var context = new FamilyTreeContext(GetFamilyTreeContextInMemoryOptions()))
            {
                context.PersonList.AddRange(_personList);
                context.CoupleList.AddRange(_coupleList);
                context.ChildList.AddRange(_childList);

                context.SaveChanges();
            }
        }
Пример #2
0
        public static void AssemblyInit(TestContext testContext)
        {
            using (var context = new FamilyTreeContext(GetFamilyTreeContextInMemoryOptions()))
            {
                context.PersonList.AddRange(_personList);
                context.CoupleList.AddRange(_coupleList);
                context.ChildList.AddRange(_childList);

                context.SaveChanges();
            }
        }