public void DeleteWithReports(int id) { var reportToDelete = _commentReportService.GetAllForComment(id); foreach (var report in reportToDelete) { _commentReportService.DeleteReport(report.Id); } _commentRepository.Delete(id); }
public ActionResult DeleteReport(int id) { _commentReportService.DeleteReport(id); return(Redirect(Request.UrlReferrer.PathAndQuery)); }