public IEnumerable <HomeViewModel> GetAllHouses() { var houses = _animalManager.GetAllHomes(); var result = _mapper.Map <List <HomeViewModel> >(houses); return(result); }
public ActionResult HomesDataPartialView() { var result = new AnimalHomeCollectionViewModel(); var getHome = _animalManager.GetAllHomes(); result.ListAllModels = _mapper.Map <List <AnimalHomeViewModel> >(getHome); return(PartialView(result)); }
// GET: api/Homes public string Get() { var homeList = _animalsManager.GetAllHomes(); var result = _mapper.Map <IEnumerable <HomeViewModel> >(homeList); return(_jsonConverter.Convert(result)); }
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)); }