コード例 #1
0
ファイル: CommentService.cs プロジェクト: ligaluse/MoneyBlog
        public void DeleteWithReports(int id)
        {
            var reportToDelete = _commentReportService.GetAllForComment(id);

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