Ejemplo n.º 1
0
        private void Seed()
        {
            using (var context = new Lab2Context(ContextOptions))
            {
                context.Database.EnsureDeleted();
                context.Database.EnsureCreated();

                var one = new Rooms {
                    RoomID = 1, Description = "oll", Number = 100, Price = 5
                };

                var two = new Rooms {
                    RoomID = 2, Description = "fgdhl", Number = 200, Price = 50
                };

                var three = new Rooms {
                    RoomID = 3, Description = "room", Number = 300, Price = 500
                };

                context.AddRange(one, two, three);

                context.SaveChanges();
            }
        }