private void MockDB(BookMyTicketDBContext bookMyTicketDB) { bookMyTicketDB.Cities.Add(new Entities.City { ID = 1, Name = "City" }); bookMyTicketDB.Movies.Add(new Entities.Movie { ID = 1, Name = "Movie", Description = "Movie1", Duration = 120, Poster = "Poster", ReleaseDate = DateTime.Now }); bookMyTicketDB.CinemaSeating.Add(new Entities.CinemaSeating { ID = 1, SeatNumber = "A1", ColumnNumber = 0, RowNumber = 0, LayoutID = 1 }); bookMyTicketDB.CinemaSeating.Add(new Entities.CinemaSeating { ID = 2, SeatNumber = "A2", ColumnNumber = 0, RowNumber = 1, LayoutID = 1 }); bookMyTicketDB.Cinema.Add(new Entities.Cinema { ID = 1, Name = "Cinema", CityID = 1, LayoutID = 1 }); bookMyTicketDB.Shows.Add(new Entities.Show { ID = 1, CinemaID = 1, MovieID = 1, ShowTime = DateTime.Now, PricePerUnit = 123 }); bookMyTicketDB.Shows.Add(new Entities.Show { ID = 2, CinemaID = 1, MovieID = 1, ShowTime = DateTime.Now.AddDays(1), PricePerUnit = 13 }); bookMyTicketDB.SaveChanges(); }
public void Save() { _context.SaveChanges(); }