public ActionResult GetPlayer(int playerId) { PlayerDomainModel pDM = playerBusiness.getPlayer(playerId); PlayerSkillsDomainModel sDM = playerSkillBusiness.getPlayerSkills(pDM.skill); PlayerSkillRelationViewModel result = new PlayerSkillRelationViewModel(); PlayerViewModel pVM = new PlayerViewModel(); PlayerSkillViewModel sVM = new PlayerSkillViewModel(); AutoMapper.Mapper.Map(pDM, pVM); AutoMapper.Mapper.Map(sDM, sVM); result.PlayerVM = pVM; result.SkillVM = sVM; ViewBag.TeamList = new SelectList(getTeamVM(), "teamId", "teamName"); ViewBag.playerId = playerId; return(PartialView("EditPlayerPartial", result)); }