Beispiel #1
0
 private static void AddTestData(HotelApiContext context)
 {
     context.Rooms.Add(new RoomEntity
     {
         Id   = new Guid("703761e1-b729-47cf-a62a-9f21d99d0da9"),
         Name = "Oxford Suite",
         Rate = 10119
     });
     context.Rooms.Add(new RoomEntity
     {
         Id   = new Guid("90f31833-fa92-4418-ad73-78a031619b79"),
         Name = "Driscoll suite",
         Rate = 23959
     });
     context.SaveChanges();
 }
Beispiel #2
0
        private static void AddTestData(HotelApiContext context)
        {
            // Adding some test data for development
            context.Rooms.Add(new RoomEntity
            {
                Id   = Guid.Parse("301df04d-8679-4b1b-ab92-0a586ae53d08"),
                Name = "Oxford Suite",
                Rate = 10119,
            });

            context.Rooms.Add(new RoomEntity
            {
                Id   = Guid.Parse("ee2b83be-91db-4de5-8122-35a9e9195976"),
                Name = "Driscoll Suite",
                Rate = 23959
            });

            context.SaveChanges();
        }