public ActionResult DeleteFromRetreat(DeleteParticipantFromRetreatViewModel viewModel) { var retreat = _retreatRepository.GetById(viewModel.RetreatId); retreat.RemoveParticipant(viewModel.ParticipantId); _retreatRepository.Save(retreat); return this.RedirectToAction<RetreatController>(c => c.Index(viewModel.RetreatId)); }
public ViewResult DeleteFromRetreat(int retreatId, DateTime retreatDate, int participantId, string firstName, string lastName) { var viewModel = new DeleteParticipantFromRetreatViewModel { RetreatId = retreatId, RetreatDate = retreatDate, ParticipantId = participantId, FirstName = firstName, LastName = lastName, }; return View("DeleteFromRetreat", viewModel); }