Esempio n. 1
0
        public static void Initialize(ArchitectDbContext context)
        {
            context.Database.EnsureCreated();

            // Look for any movies
            if (context.Customers.Any())
            {
                return;
            }

            context.Customers.AddRange(
                new Customer {
                FirstName = "Kurt", LastName = "Van de gaer"
            },
                new Customer {
                FirstName = "Erik", LastName = "Kaes"
            },
                new Customer {
                FirstName = "Philippe", LastName = "Kenens"
            },
                new Customer {
                FirstName = "Petra", LastName = "Luyten"
            }
                );

            context.SaveChanges();
        }
Esempio n. 2
0
        public static void Seed(ArchitectDbContext dbContext)
        {
            dbContext.Add(new User()
            {
                FirstName = "Name", LastName = "Surname", Username = "******", Password = "******"
            });
            dbContext.Add(new Record()
            {
                Description = "Record 1"
            });

            dbContext.SaveChanges();
        }