public ActionResult InsertUserRecruitmentAgent(RecruitmentAgentViewModel recruitmentAgentViewModel) { ViewBag.RecruitmentAgentIdList = GetRecrutimentAgentIds(); ViewBag.JobsIdList = GetJobIds(); ViewBag.AddressIdList = GetAddressIds(); if (ModelState.IsValid) { var mapper = AutoMapperConfig.Configure(); var recruitmentAgency = mapper.Map <RecruitmentAgentViewModel, RecruitmentAgency>(recruitmentAgentViewModel); _repositoryEndPointService.InsertRecruitmentAgency(recruitmentAgency); return(View("Success")); } return(View("CreateReadUpdateUserRecruitmentAgent", recruitmentAgentViewModel)); }