public async Task <IActionResult> Edit(Guid id, [Bind("Id,Applicant,Skill,SkillLevel,StartMonth,StartYear,EndMonth,EndYear,TimeStamp")] ApplicantSkills applicantSkills) { if (id != applicantSkills.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(applicantSkills); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ApplicantSkillsExists(applicantSkills.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Applicant"] = new SelectList(_context.ApplicantProfiles, "Id", "Id", applicantSkills.Applicant); return(View(applicantSkills)); }
public async Task <IActionResult> Create([Bind("Id,Applicant,Skill,SkillLevel,StartMonth,StartYear,EndMonth,EndYear,TimeStamp")] ApplicantSkills applicantSkills) { if (ModelState.IsValid) { applicantSkills.Id = Guid.NewGuid(); _context.Add(applicantSkills); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["Applicant"] = new SelectList(_context.ApplicantProfiles, "Id", "Id", applicantSkills.Applicant); return(View(applicantSkills)); }