public async Task <IActionResult> Edit(int id, [Bind("Id,AnnualReviewId,GeneralQuestionId,GeneralQuestionResponse")] TblAnnualReviewGeneralQuestionResponse tblAnnualReviewGeneralQuestionResponse) { if (id != tblAnnualReviewGeneralQuestionResponse.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblAnnualReviewGeneralQuestionResponse); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblAnnualReviewGeneralQuestionResponseExists(tblAnnualReviewGeneralQuestionResponse.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tblAnnualReviewGeneralQuestionResponse)); }
public async Task <IActionResult> Create([Bind("Id,AnnualReviewId,GeneralQuestionId,GeneralQuestionResponse")] TblAnnualReviewGeneralQuestionResponse tblAnnualReviewGeneralQuestionResponse) { if (ModelState.IsValid) { _context.Add(tblAnnualReviewGeneralQuestionResponse); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblAnnualReviewGeneralQuestionResponse)); }