public async Task <IActionResult> Edit(int id, [Bind("Id,Name,FileType,Description,FilePath,VideoYolu")] VideoModel videoModel) { if (id != videoModel.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(videoModel); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VideoModelExists(videoModel.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(videoModel)); }
public async Task <IActionResult> Edit(long id, [Bind("ImageId,Title,ImageName")] ImageModel imageModel) { if (id != imageModel.ImageId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(imageModel); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ImageModelExists(imageModel.ImageId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(imageModel)); }
public async Task <IActionResult> Edit(int id, [Bind("HaberId,Baslik,İcerik,SonDakika,ResimYolu")] Haber haber) { if (id != haber.HaberId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(haber); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HaberExists(haber.HaberId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(haber)); }