예제 #1
0
        public ActionResult Homes()
        {
            var homeList = _animalsManager.GetAllHomes();

            var result = new GetAllHomesViewModel();

            result.Homes = _mapper.Map <IList <HomeViewModel> >(homeList);

            return(View(result));
        }
예제 #2
0
        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));
        }