Exemple #1
0
 public void Seed(MovieDatabase database, Movie[] movies)
 {
     foreach (var movie in movies)
     {
         database.Add(movie);
     }
 }
Exemple #2
0
        public void Seed(MovieDatabase database)
        {
            var movies = new[] {
                new Movie()
                {
                    Name        = "Jaws",
                    RunLength   = 120,
                    ReleaseYear = 1977,
                },
                new Movie()
                {
                    Name        = "What About Bob?",
                    RunLength   = 96,
                    ReleaseYear = 2004,
                },
            };

            Seed(database, movies);
        }