public async Task <IActionResult> Edit(int id, [Bind("ID,Name,Surname,PersonalDetails")] Employees employees) { if (id != employees.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(employees); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmployeesExists(employees.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(employees)); }
public async Task <IActionResult> Edit(int id, [Bind("RelationID,EmplID,SkillID")] EmplSkills emplSkills) { if (id != emplSkills.RelationID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(emplSkills); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmplSkillsExists(emplSkills.RelationID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(emplSkills)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Name,Description")] Skills skills) { if (id != skills.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(skills); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkillsExists(skills.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(skills)); }