Пример #1
0
        public static void PopulateTestData(VehicleContext db)
        {
            db.AddRange(
                new Vehicle
            {
                Year  = 2015,
                Make  = "Nissan",
                Model = "Versa"
            },
                new Vehicle
            {
                Year  = 1965,
                Make  = "Ford",
                Model = "Mustang"
            },
                new Vehicle
            {
                Year  = 1967,
                Make  = "Chevy",
                Model = "Impala"
            }
                );

            db.SaveChanges();
        }