コード例 #1
0
        public ActionResult GetAllInterests()
        {
            InterestService     _interestService = new InterestService();
            List <InterestView> response         = new List <InterestView>();

            response = _interestService.GetAllInterests();
            return(Json(response));
        }
コード例 #2
0
        public ActionResult Search(SearchWordRequest request)
        {
            SearchResponse response = new SearchResponse();

            response = word_Service.SearchWord(request);

            if (response.IsSucceed)
            {
                return(View(response));
            }
            else
            {
                NotFoundResponse result           = new NotFoundResponse();
                InterestService  interest_Service = new InterestService();
                result.Interests = interest_Service.GetAllInterests();
                result.Word      = request.Word;
                return(PartialView("_NotFoundPage", result));
            }
        }