Exemple #1
0
        public string Get()
        {
            var result = service.GetAll().ToList();

            // return JsonConvert.SerializeObject(result);
            return(JsonConvert.SerializeObject(result, Formatting.Indented, new JsonSerializerSettings
            {
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            }));
        }