Ejemplo n.º 1
0
        public ActionResult Add(string name, string remark, int songid)
        {
            Comment newComment = new Comment();
            newComment.Name = name;
            newComment.Remark = remark;
            newComment.SongID = songid;

            repository.AddComment(newComment);

            return Redirect(Request.UrlReferrer.ToString() + "#Comment-" + songid);
        }
Ejemplo n.º 2
0
 public void AddComment(Comment comment)
 {
     context.Comments.Add(comment);
     context.SaveChanges();
 }