private static void AddMovie() { using (var db = Application.GetDatabaseInstance()) { var movie = Movie1234.Build(Guid.NewGuid()); db.Movies.Add(movie); db.SaveChanges(); } }
public void GivenMovieExists() { var movie = Movie1234.Build(Guid.NewGuid()); SaveMovie(movie); var context = MyMovieTheaterFeatureContext.Get(); context.Movie = movie; context.AddSubstitute("movieId", movie.MovieId.ToString()); }
private Movie AddMovie(Guid movieId) { using (var db = Application.GetDatabaseInstance()) { var movie = Movie1234.Build(movieId); db.Movies.Add(movie); db.SaveChanges(); return(movie); } }