コード例 #1
0
        public string GetExam(int id)
        {
            ResultObject resultt = new ResultObject();

            try
            {
                resultt.Data = services.GetDetailExams(id);

                return(JsonConvert.SerializeObject(resultt, Formatting.Indented, new JsonSerializerSettings
                {
                    ReferenceLoopHandling = ReferenceLoopHandling.Ignore
                }));
            }
            catch (Exception e)
            {
                resultt.Message = "EXCEPTION: " + e.Message + "Stack: " + e.StackTrace;
                return(JsonConvert.SerializeObject(resultt));
            }
        }