public ActionResult Create(Candidate candidate)
        {
            if (ModelState.IsValid)
            {
                uow.CandidateRepository.Add(candidate);
                uow.Save();
                return RedirectToAction("Index");
            }

            return View(candidate);
        }
 public object Update(Candidate record)
 {
     try
     {
         uow.CandidateRepository.Update(record);
         uow.Save();
         return new { Result = "OK" };
     }
     catch (Exception ex)
     {
         return new { Result = "ERROR", Message = ex.Message };
     }
 }