Beispiel #1
0
        public ActionResult DeleteReviewReply(int id)
        {
            AnReviewReply anReviewReply = db.AnReviewReplys.Find(id);

            db.AnReviewReplys.Remove(anReviewReply);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public ActionResult PostReviewReply(ReviewReplyViewModel obj)
        {
            int           userid = 1;
            AnReviewReply reply  = new AnReviewReply();

            reply.UserId          = userid;
            reply.ReviewReplyText = obj.AnReviewReply;
            if (reply.ReviewReplyText == null)
            {
                return(RedirectToAction("Error"));
            }
            reply.ReviewId = obj.AReviewId;
            db.AnReviewReplys.Add(reply);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }