Пример #1
0
        public ActionResult Delete(int commentId)
        {
            var announcementComment = _productCommentRepository.Read(commentId);

            if (announcementComment == null)
            {
                return(HttpNotFound());
            }

            try
            {
                _productCommentRepository.Delete(announcementComment);
            }
            catch
            {
                TempData["error"] = ProjectConfiguration.Get.DataErrorMessage;
            }

            return(RedirectToAction("Feedbacks", "Product", new { id = announcementComment.ProductId }));
        }
Пример #2
0
 public ProductFeedback Delete(int id)
 {
     return(_productFeedback.Delete(id));
 }