public ActionResult AddOrUpdateEducation(EducationVM education) { string msg = string.Empty; if (education != null) { //Creating Mapping Mapper.Initialize(cfg => cfg.CreateMap <EducationVM, Education>()); Education educationEntity = Mapper.Map <Education>(education); int idPer = (int)Session["IdSelected"]; msg = _resumeRepository.AddOrUpdateEducation(educationEntity, idPer); } else { msg = "Please re try the operation"; } return(Json(new { data = msg }, JsonRequestBehavior.AllowGet)); }