public void AddMovie()
 {
     var movie = new Movie()
     {
         Name = "Batman",
         Artists = new List<Artist>(),
         SectionId = Sections.Top10
     };
     _movieRepository.Create(movie);
 }
Beispiel #2
0
 public ActionResult Add(Movie movie)
 {
     _movieService.Add(movie);
     return RedirectToAction("Index");
 }
Beispiel #3
0
 public ActionResult Edit(Movie movie)
 {
     _movieService.Update(movie);
     return RedirectToAction("Index");
 }
Beispiel #4
0
 public void AddMovies()
 {
     var list = Enum.GetValues(typeof(Sections));
     int k = 1;
     foreach (Sections item in list)
     {
         for (int i = 0; i < 25; i++)
         {
             var movie = new Movie()
             {
                 Name = "Batman " + (i + k * 24),
                 Artists = new List<Artist>(),
                 SectionId = item,
                 ThumbNailImagePath = ((i % 12) + 1) + ".jpg"
             };
             this._movieRepository.Create(movie);
         }
     }
 }