public async Task <IActionResult> OnGetAsync(int reportId) { this.Data = await this.reportsService .GetReportByIdAsync <ReportEntityInputModel>(reportId); if (this.Data == null) { return(this.NotFound()); } return(this.Page()); }
public async Task <int> DeleteComment(ReportEntityInputModel inputModel) { var currentReport = this.reportsRepositroy.All() .Where(r => r.Id == inputModel.Id).FirstOrDefault(); if (currentReport == null) { return(default(int)); } currentReport.IsDeleted = true; var statusCode = await this.reportsRepositroy.SaveChangesAsync(); return(statusCode); }