コード例 #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();
 }
コード例 #2
0
 // ignores cast members
 public void CreateMovie(Movie movie)
 {
     _db.Add(Map(movie));
     _db.SaveChanges();
 }