public async Task <IActionResult> Edit(int id, [Bind("id,vraag,antwoord")] FAQ fAQ) { if (id != fAQ.id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(fAQ); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FAQExists(fAQ.id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(fAQ)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Voornaam,Achternaam,Geslacht,Land,Email")] Nieuwsbriefmodel nieuwsbriefmodel) { if (id != nieuwsbriefmodel.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(nieuwsbriefmodel); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NieuwsbriefmodelExists(nieuwsbriefmodel.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(nieuwsbriefmodel)); }
public async Task <IActionResult> Edit(int id, [Bind("id,naam,prijs,omschrijving")] Product product) { if (id != product.id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(product); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductExists(product.id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(product)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Voornaam,Achternaam,Telefoonnummer,Land,Email")] Contact contact) { if (id != contact.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(contact); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ContactExists(contact.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(contact)); }