Exemple #1
0
 public void CreateMovie(Movie movie)
 {
     _db.Movie.Add(new Data.Movie
     {
         Id                  = movie.Id, Title = movie.Title,
         ReleaseDate         = movie.ReleaseDate,
         CastMemberJunctions = movie.Cast(c => new Data.CastMember {
             Name = c
         }).ToList()
     });
     _db.SaveChanges();
 }
 // ignores cast members
 public void CreateMovie(Movie movie)
 {
     _db.Add(Map(movie));
     _db.SaveChanges();
 }