public async Task <IActionResult> Add(ReportView result) { if (result.SpiderId == 0 || result.ReportCategory == "null") { return(RedirectToAction("List")); } else { var user = await _userManager.GetUserAsync(User); var reportModel = ReportHelpers.ConvertToModel(result, user); var report = await _reportService.Create(reportModel); if (report == false) { return(RedirectToAction("Index", "Dashboard")); } await _cloudinaryService.AddReportImage(result.FormFileImg, reportModel.Id); } return(RedirectToAction("List")); }