public async Task <IActionResult> Edit(int id, [Bind("Id,Date,Remarks")] InterviewMeeting interviewMeeting) { if (id != interviewMeeting.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(interviewMeeting); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InterviewMeetingExists(interviewMeeting.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(interviewMeeting)); }
public async Task <IActionResult> Create([Bind("Id,Date,Remarks")] InterviewMeeting interviewMeeting) { if (ModelState.IsValid) { _context.Add(interviewMeeting); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(interviewMeeting)); }