Exemplo n.º 1
0
        private static void AddTestData(TravelBlogContext context)
        {
            var testUser1 = new Models.Person
            {
                Name = "Elise"
            };

            context.People.Add(testUser1);

            var testExperience = new Models.Experience
            {
                Name     = "Go to the beach",
                Story    = "It was awesome",
                PersonId = 1,
                PlaceId  = 1
            };

            context.Experiences.Add(testExperience);

            var testLocation = new Models.Place
            {
                Name = "Los Angeles"
            };

            context.Places.Add(testLocation);

            context.SaveChanges();
        }