Example #1
0
        public ActionResult Remove(int id)
        {
            var mentor = _mentorService.GetById(id);

            var removeMentor = new RemoveMentor
            {
                Id   = id,
                Name = mentor.User.Name
            };

            foreach (var m in mentor.Mentees)
            {
                var mentee = _menteeService.GetById(m.Id);
                removeMentor.MenteeNames.Add(mentee.User.Name);
            }

            return(View(removeMentor));
        }
Example #2
0
        public ActionResult Remove(RemoveMentor removeMentor)
        {
            _mentorService.SetInactive(removeMentor.Id);

            return(RedirectToAction("Summary"));
        }