public async Task <IActionResult> Edit(int id, [Bind("Id,LinkImage,Name,Link")] Social social) { if (id != social.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(social); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SocialExists(social.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(social)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Email,Password")] Account account) { if (id != account.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(account); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AccountExists(account.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(account)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,LinkImage,Name,Percent,Text")] Language language) { if (id != language.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(language); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LanguageExists(language.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(language)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name")] Topic topic) { if (id != topic.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(topic); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TopicExists(topic.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(topic)); }