public void AddComment(View.Comment comment) { // Find movie var movie = DB.Movies .Include(m => m.Comments) .FirstOrDefault(m => m.Id == comment.MovieId); // If the movie exists add the comment if (movie != null) { movie.Comments.Add(new Comment() { Text = comment.Text, Author = comment.Author, Date = comment.Date, }); } DB.SaveChanges(); }
public void AddComment(View.Comment comment) { throw new NotImplementedException(); }