public async Task <IActionResult> Edit(int id, [Bind("Id,AnnualReviewId,CompetencyNumber,CompetencyResponseExperienceCapabilityRatingId,CompetencyResponseIndustry,CompetencyResponseGrowthInterest,CompetencyResponseNotes")] TblAnnualReviewCompetencyResponse tblAnnualReviewCompetencyResponse) { if (id != tblAnnualReviewCompetencyResponse.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblAnnualReviewCompetencyResponse); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblAnnualReviewCompetencyResponseExists(tblAnnualReviewCompetencyResponse.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tblAnnualReviewCompetencyResponse)); }
public async Task <IActionResult> Create([Bind("Id,AnnualReviewId,CompetencyNumber,CompetencyResponseExperienceCapabilityRatingId,CompetencyResponseIndustry,CompetencyResponseGrowthInterest,CompetencyResponseNotes")] TblAnnualReviewCompetencyResponse tblAnnualReviewCompetencyResponse) { if (ModelState.IsValid) { _context.Add(tblAnnualReviewCompetencyResponse); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblAnnualReviewCompetencyResponse)); }