public async Task <IActionResult> Create([Bind("Name, FileScreenShot, ImageFile,TransactionId,Id")] FileDTO fileDTO) { if (fileDTO.ImageFile == null || fileDTO.ImageFile.Length == 0) { return(View(fileDTO)); } if (ModelState.IsValid) { _fileService.AddFiles(fileDTO); if (Request.Form["AddElements"].Any()) { return(RedirectToAction("Create", "TransactionElement", new { transactionId = fileDTO.TransactionId })); } return(RedirectToAction("Index", "Transaction")); } return(View(fileDTO)); }