public async Task <IActionResult> Edit(int id, [Bind("Meeting,Conductor,OpeningSong,StartPrayer,SacramentSong,Sacrament,SpeakerOne,SpeakerTwo,OptionalSong,SpeakerThree,ClosingSong,EndPrayer")] PlannedMeeting plannedMeeting) { if (id != plannedMeeting.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(plannedMeeting); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlannedMeetingExists(plannedMeeting.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(plannedMeeting)); }
public async Task <IActionResult> Create([Bind("Meeting,Conductor,OpeningSong,StartPrayer,SacramentSong,Sacrament,SpeakerOne,SpeakerTwo,OptionalSong,SpeakerThree,ClosingSong,EndPrayer")] PlannedMeeting plannedMeeting) { if (ModelState.IsValid) { _context.Add(plannedMeeting); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(plannedMeeting)); }