Exemple #1
0
        public ActionResult Remove(int id)
        {
            var mentee = _menteeService.GetById(id);

            var removeMentee = new RemoveMentee
            {
                Id   = id,
                Name = mentee.User.Name
            };

            if (mentee.Mentor != null)
            {
                var mentor = _mentorService.GetById(mentee.Mentor.Id);
                removeMentee.MentorName = mentor.User.Name;
            }

            return(View(removeMentee));
        }
Exemple #2
0
        public ActionResult Remove(RemoveMentee removeMentee)
        {
            _menteeService.SetInactive(removeMentee.Id);

            return(RedirectToAction("Summary"));
        }