public async Task <IActionResult> Edit(int id, [Bind("CourseSectionMemberId,Observations,Punctuation")] CourseSectionMember courseSectionMember) { if (id != courseSectionMember.CourseSectionMemberId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(courseSectionMember); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CourseSectionMemberExists(courseSectionMember.CourseSectionMemberId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(courseSectionMember)); }
public async Task <IActionResult> Create([Bind("CourseSectionMemberId,Observations,Punctuation")] CourseSectionMember courseSectionMember) { if (ModelState.IsValid) { _context.Add(courseSectionMember); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(courseSectionMember)); }