public ActionResult Homes() { var homeList = _animalsManager.GetAllHomes(); var result = new GetAllHomesViewModel(); result.Homes = _mapper.Map <IList <HomeViewModel> >(homeList); return(View(result)); }
public string Get() { var result = new GetAllHomesViewModel(); var getHome = _animalManager.GetAllHomes(); result.Homes = _mapper.Map <List <HomeViewModel> >(getHome); var json = new JsonConvertor(); return(json.Convert(result.Homes)); }