Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 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);
 }