コード例 #1
0
        public string LogOut()
        {
            FormsAuthentication.SignOut();
            var json = new JsonConvertor();

            return(json.Convert(RedirectToAction("Index", "Home")));
        }
コード例 #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));
        }
コード例 #3
0
        public string GetAllAnimalsJson()
        {
            var result     = new GetAllAnimalsViewModel();
            var getAnimals = _animalManager.GetAllAnimals();

            result.Animals = _mapper.Map <List <AnimalViewModel> >(getAnimals);

            var json = new JsonConvertor();

            return(json.Convert(result.Animals));
        }