Ejemplo n.º 1
0
 public static void AddMovies(IEnumerable <MoviesDTo> movies)
 {
     using (var context = new IMDbEntities())
     {
         foreach (var MoviesDTo in movies)
         {
             Console.WriteLine($"Succesfully added movie {MoviesDTo.title}");
         }
         context.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public static void AddGenres(IEnumerable <GenresDTo> genres)
 {
     using (var context = new IMDbEntities())
     {
         foreach (var gen in genres)
         {
             Console.WriteLine($"Succesfully added Genre {gen.name}");
         }
         context.SaveChanges();
     }
 }