Example #1
0
        public void DeleteWithReports(int id)
        {
            var reportToDelete = _commentReportService.GetAllForComment(id);

            foreach (var report in reportToDelete)
            {
                _commentReportService.DeleteReport(report.Id);
            }
            _commentRepository.Delete(id);
        }
Example #2
0
 public ActionResult DeleteReport(int id)
 {
     _commentReportService.DeleteReport(id);
     return(Redirect(Request.UrlReferrer.PathAndQuery));
 }