public async Task <IActionResult> Edit(int id, [Bind("student_ID,student_Name,student_Email,student_Mobile,student_Address")] student_Details student_Details) { if (id != student_Details.student_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(student_Details); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!student_DetailsExists(student_Details.student_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(student_Details)); }
public async Task <IActionResult> Edit(int id, [Bind("course_ID,course_Name,start_date,end_date,course_duration")] Course_details course_details) { if (id != course_details.course_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(course_details); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Course_detailsExists(course_details.course_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(course_details)); }
public async Task <IActionResult> Edit(int id, [Bind("Student_Enrollment_ID,student_ID,course_ID,tutor_ID")] Student_enrollment student_enrollment) { if (id != student_enrollment.Student_Enrollment_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(student_enrollment); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Student_enrollmentExists(student_enrollment.Student_Enrollment_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(student_enrollment)); }