コード例 #1
0
        public JsonTutorial tutorialList()
        {
            JsonTutorial             jsonTutorial    = new JsonTutorial();
            List <TutorialViewModel> tutorialLISTOBJ = new List <TutorialViewModel>();

            try
            {
                var tutorialListes = _link.TutorialCategory();
                foreach (var item in tutorialListes)
                {
                    TutorialViewModel tutorialOBJ = new TutorialViewModel();
                    tutorialOBJ.Title       = item.Title;
                    tutorialOBJ.Link        = item.Url;
                    tutorialOBJ.Description = item.Description;
                    tutorialLISTOBJ.Add(tutorialOBJ);
                }
                jsonTutorial.Result = tutorialLISTOBJ;
                return(jsonTutorial);
            }
            catch (Exception ex)
            {
                _ = ex.Message;
                return(jsonTutorial);
            }
        }