예제 #1
0
        public ActionResult DeleteCandidate(CandidateVM candidate)
        {
            try
            {
                candidate = _candidateManager.RetrieveCandidateByCandidateID(candidate.CandidateID);


                _candidateManager.DeleteCandidate(candidate.CandidateID);

                return(RedirectToAction("Details", new { id = candidate.ElectionID }));
            }
            catch (Exception)
            {
                return(View());
            }
        }