public ActionResult GetTexiInfo()
        {
            //Initial Variables
            ITexi repos = DataFactory.TexiRepository();

            return(Content(JsonConvert.SerializeObject(repos.GetTexiInfo()), "application/json"));
        }
Beispiel #2
0
        public List <TexiDeserialize> GetText()
        {
            //Initial Variables
            ITexi repos = DataFactory.TexiRepository();

            return(repos.GetTexiInfo());
        }
Beispiel #3
0
        public IHttpActionResult GetTexiInfo()
        {
            //Initial
            IHttpActionResult responseResult;
            ITexi             repos = DataFactory.TexiRepository();
            //序列化撈出來的資料
            var jsonSerialize = JsonConvert.SerializeObject(repos.GetTexiInfo());
            //做成JSON字串包裝到最後輸出
            StringContent       responseMsgString = new StringContent(jsonSerialize, System.Text.Encoding.UTF8, "application/json");
            HttpResponseMessage responseMsg       = new HttpResponseMessage()
            {
                Content = responseMsgString
            };

            responseResult = ResponseMessage(responseMsg);

            return(responseResult);
        }