public ActionResult DeleteFileData(string fileId, string fileName) { try { _homeService.DeleteFileData(fileId); ModelState.AddModelError(string.Empty, $"The file {fileName} was deleted successfully"); } catch (Exception ex) { Console.WriteLine(ex); ModelState.AddModelError(string.Empty, ex.Message); } return(RedirectToAction("GetAllAssignedFileData", "Home")); }