{"id":479,"date":"2015-11-07T20:29:53","date_gmt":"2015-11-07T18:29:53","guid":{"rendered":"https:\/\/gokhan-gokalp.com\/?p=479"},"modified":"2015-11-07T20:51:01","modified_gmt":"2015-11-07T18:51:01","slug":"asp-net-web-apida-circular-reference-handling","status":"publish","type":"post","link":"https:\/\/gokhan-gokalp.com\/tr\/asp-net-web-apida-circular-reference-handling\/","title":{"rendered":"Asp.NET Web API\u2019da Circular Reference Handling"},"content":{"rendered":"<p>Merhaba arkada\u015flar.<\/p>\n<p>Y\u0131lba\u015f\u0131ndan sonra \u00e7\u0131kacak olan Asp.Net Web API kitab\u0131m\u0131za odakland\u0131\u011f\u0131m i\u00e7in bu aralar fazla makale yazam\u0131yorum. Fakat e-mail arac\u0131l\u0131\u011f\u0131 ile gelen sorular ve benimde bir ka\u00e7 projede kar\u015f\u0131 kar\u015f\u0131ya gelmem nedeniyle <strong>&#8220;Self referencing loop detected&#8221;<\/strong>\u00a0problemini nas\u0131l handle\u00a0edebilece\u011fimizi\u00a0kitab\u0131n bir b\u00f6l\u00fcm\u00fcnden alarak makale olarak koymak\u00a0istedim. :)<\/p>\n<p>Circular referans yani d\u00f6ng\u00fcsel referans, farkl\u0131 modellerin <strong>birbirlerini<\/strong> referans olarak g\u00f6rmesidir. \u00d6zellikle entity framework kullan\u0131larak olu\u015fturulan modeller i\u00e7erisindeki, navigation property\u2019ler \u00fczerinde g\u00f6r\u00fclmektedir. Dilerseniz a\u015fa\u011f\u0131daki model kod blo\u011funa bir bakal\u0131m:<\/p>\n<pre class=\"lang:c# decode:true \">public class Customer\r\n{\r\n    public Customer()\r\n    {\r\n        Orders = new Collection&lt;Order&gt;();\r\n    }\r\n\r\n    public int Id { get; set; }\r\n    public string Name { get; set; }\r\n    public string Surname { get; set; }\r\n    public string Email { get; set; }\r\n    public string PhoneNumber { get; set; }\r\n\r\n    public ICollection&lt;Order&gt; Orders { get; set; }\r\n}\r\n\r\npublic class Order\r\n{\r\n    public int Id { get; set; }\r\n    public int BasketId { get; set; }\r\n    public DateTime OrderDate { get; set; }\r\n\r\n    public Customer Customer { get; set; }\r\n}\r\n<\/pre>\n<p>Yukar\u0131daki kod blo\u011funda bulunan Customer ve Order modellerinin navigation property\u2019lerine bakt\u0131\u011f\u0131m\u0131zda Customer\u2019\u0131n Order tipinde bir collection\u2019a sahip oldu\u011funu, Order\u2019\u0131n ise Customer tipinde d\u00f6ng\u00fcsel bir navigation property\u2019e sahip oldu\u011funu g\u00f6rebiliriz.<\/p>\n<p>\u0130lgili serializer bu modeli serialize etmeye \u00e7al\u0131\u015ft\u0131\u011f\u0131nda ise a\u015fa\u011f\u0131daki hatay\u0131 verecektir:<\/p>\n<p><a href=\"\/wp-content\/uploads\/2015\/11\/self-loop-reference.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-480 lazyload\" data-src=\"\/wp-content\/uploads\/2015\/11\/self-loop-reference.jpg\" alt=\"self loop reference\" width=\"452\" height=\"423\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2015\/11\/self-loop-reference.jpg 452w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2015\/11\/self-loop-reference-300x281.jpg 300w\" data-sizes=\"(max-width: 452px) 100vw, 452px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 452px; --smush-placeholder-aspect-ratio: 452\/423;\" \/><\/a><\/p>\n<p>Serialize i\u015flemi s\u0131ras\u0131nda birbirlerini d\u00f6ng\u00fcsel olarak referans g\u00f6steren iki navigation property\u2019den dolay\u0131 serialize i\u015flemi bir loop\u2019a girmekte ve bu sebeple ilgili serializer bu d\u00f6ng\u00fcy\u00fc nas\u0131l handle edebilece\u011fini bilmedi\u011fi i\u00e7in \u201c<strong>Self referencing loop detected for property<\/strong>\u201d hatas\u0131n\u0131 vermektedir.<\/p>\n<p>Asp.NET Web API i\u00e7erisinde bu sorunu handle edebilmek i\u00e7in \u00fc\u00e7 farkl\u0131 yol vard\u0131r:<\/p>\n<p><strong>1) Global Olarak Circular Referans\u2019\u0131 Ignore Etmek<\/strong><\/p>\n<p>Json.NET serializer\u2019\u0131n, serializer ayarlar\u0131nda a\u015fa\u011f\u0131daki kod blo\u011fu ile global d\u00fczeyde circular referans\u2019\u0131 ignore edebiliriz.<\/p>\n<pre class=\"lang:c# decode:true \">public static class WebApiConfig\r\n{\r\n    public static void Register(HttpConfiguration config)\r\n    {\r\n        config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;\r\n    }\r\n}<\/pre>\n<p>Yukar\u0131daki kod blo\u011fu ile loop referans\u2019a sebep veren property, ilgili referans bilgisini kaybetmi\u015f olacak ve a\u015fa\u011f\u0131daki gibi bir json \u00e7\u0131kt\u0131s\u0131 ediyor olaca\u011f\u0131z:<\/p>\n<pre class=\"lang:js decode:true \">{\r\n    \"Id\": 1,\r\n    \"Name\": \"G\u00f6khan\",\r\n    \"Surname\": \"G\u00f6kalp\",\r\n    \"Email\": \"gokhan@gokalp.com\",\r\n    \"PhoneNumber\": \"09999999999\",\r\n    \"Orders\": [{\r\n        \"Id\": 1,\r\n        \"BasketId\": 1,\r\n        \"OrderDate\": \"2015-11-07T00:00:00+03:00\"\r\n    }]\r\n}\r\n<\/pre>\n<p><strong><br \/>\n2) Global Olarak Circular Referans\u2019\u0131 Korumak Etmek<\/strong><\/p>\n<p>Json.NET serializer\u2019\u0131n serializer ayarlar\u0131nda, circular referans\u2019\u0131 ignore edebildi\u011fimiz gibi <strong>preserving<\/strong> ayar\u0131 ile bunu global d\u00fczeyde koruyabilmemizde m\u00fcmk\u00fcnd\u00fcr.<\/p>\n<pre class=\"lang:js decode:true \">public static class WebApiConfig\r\n{\r\n    public static void Register(HttpConfiguration config)\r\n    {\r\n        config.Formatters.JsonFormatter.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.All;\r\n    }\r\n}<\/pre>\n<p>Yukar\u0131daki kod blo\u011fu ile circular referans\u2019a sebep olabilecek referanslar\u0131 nas\u0131l handle edebilece\u011fini ilgili serializer\u2019a bildiriyoruz ve bunun sonucunda ise json \u00e7\u0131kt\u0131s\u0131 biraz de\u011fi\u015fmi\u015f olacak.<\/p>\n<pre class=\"lang:js decode:true \">{\r\n    \"$id\": \"1\",\r\n    \"Id\": 1,\r\n    \"Name\": \"G\u00f6khan\",\r\n    \"Surname\": \"G\u00f6kalp\",\r\n    \"Email\": \"gokhan@gokalp.com\",\r\n    \"PhoneNumber\": \"09999999999\",\r\n    \"Orders\": {\r\n        \"$id\": \"2\",\r\n        \"$values\": [{\r\n            \"$id\": \"3\",\r\n            \"Id\": 1,\r\n            \"BasketId\": 1,\r\n            \"OrderDate\": \"2015-11-07T00:00:00+03:00\",\r\n            \"Customer\": {\r\n                \"$ref\": \"1\"\r\n            }\r\n        }]\r\n    }\r\n}\r\n<\/pre>\n<p>Yukar\u0131daki json \u00e7\u0131kt\u0131s\u0131nda g\u00f6rebilece\u011fimiz \u00fczere <strong>PreserveReferencesHandling<\/strong> ayar\u0131 ile \u201c$id\u201d ve \u201c$ref\u201d de\u011ferleri t\u00fcm referans bilgilerini tutabilmektedir ve b\u00f6ylece d\u00f6ng\u00fcsel referans hatas\u0131na sebep olabilecek problemin \u00f6n\u00fcne ge\u00e7ebilmektedir.<\/p>\n<p><strong>NOT<\/strong>: Unutmamal\u0131y\u0131z ki PreserveReferencesHandling ayar\u0131 ile json \u00e7\u0131kt\u0131s\u0131 \u00fczerinde referanslar\u0131 tutabilmesi i\u00e7in olu\u015fturulmu\u015f olan bu object referanslar\u0131 bir JSON standart\u0131 de\u011fildir. Bu nedenle bu i\u015flemi yapmadan \u00f6nce ilgili client\u2019\u0131n gelen json sonucunu nas\u0131l parse edebilece\u011fini bilmesi gerekmektedir.<\/p>\n<p><strong>3) Model veya Property D\u00fczeyinde Circular Referans\u2019\u0131 Ignore Ermek veya Korumak<\/strong><\/p>\n<p>Bu y\u00f6ntemde ise global d\u00fczey yerine i\u015fi biraz daha spesifikle\u015ftirerek model veya property d\u00fczeyinde attribute\u2019ler arac\u0131l\u0131\u011f\u0131 ile ger\u00e7ekle\u015ftirebilmek m\u00fcmk\u00fcnd\u00fcr. Dilerseniz \u015fimdi hemen Customer s\u0131n\u0131f\u0131na bir g\u00f6z atal\u0131m:<\/p>\n<pre class=\"lang:c# decode:true \">public class Customer\r\n{\r\n    public Customer()\r\n    {\r\n        Orders = new Collection&lt;Order&gt;();\r\n    }\r\n\r\n    public int Id { get; set; }\r\n    public string Name { get; set; }\r\n    public string Surname { get; set; }\r\n    public string Email { get; set; }\r\n    public string PhoneNumber { get; set; }\r\n\r\n    [JsonIgnore]\r\n    [IgnoreDataMember]\r\n    public ICollection&lt;Order&gt; Orders { get; set; }\r\n}\r\n<\/pre>\n<p><strong>JsonIgnore<\/strong> ve <strong>IgnoreDataMember<\/strong> attribute\u2019leri ile hem Json.Net i\u00e7in hem de XmlSerializer i\u00e7in serialize i\u015flemi s\u0131ras\u0131nda bu property\u2019i ignore etmesini bildirdik. Bu sayede serialize i\u015flemi s\u0131ras\u0131nda bu property serialize i\u015flemine tabi olmayacakt\u0131r.<\/p>\n<p>\u015eimdide ilgili referans\u0131 koruyabilmek i\u00e7in yap\u0131lmas\u0131 gerekene bir bakal\u0131m:<\/p>\n<pre class=\"lang:c# decode:true \">[JsonObject(IsReference = true)]\r\npublic class Customer\r\n{\r\n    public Customer()\r\n    {\r\n        Orders = new Collection&lt;Order&gt;();\r\n    }\r\n\r\n    public int Id { get; set; }\r\n    public string Name { get; set; }\r\n    public string Surname { get; set; }\r\n    public string Email { get; set; }\r\n    public string PhoneNumber { get; set; }\r\n\r\n    public ICollection&lt;Order&gt; Orders { get; set; }\r\n}<\/pre>\n<p>Model d\u00fczeyinde eklemi\u015f oldu\u011fumuz <strong>JsonObject(IsReference = true)<\/strong> attribute\u2019\u00fc ile ilgili Orders referans\u0131n\u0131 korumas\u0131 gerekti\u011fini bildirdik. Ayn\u0131 i\u015flemi XmlSerializer i\u00e7in ise <strong>[DataContract(IsReference=true)]<\/strong> attribute\u2019\u00fc ile yapabilmekte m\u00fcmk\u00fcnd\u00fcr. Unutmayal\u0131m, DataContract attribute\u2019\u00fcn\u00fc ekledi\u011fimizde serializer <strong>opt-in<\/strong> yakla\u015f\u0131m\u0131na g\u00f6re davranacakt\u0131r ve serialize i\u015flemine tabi olmas\u0131n\u0131 istedi\u011fimiz property\u2019lere <strong>DataMember<\/strong> attribute\u2019\u00fcn\u00fc eklememiz gerekmektedir.<\/p>\n<p>Dilerseniz \u015fimdi birde XML i\u00e7in olu\u015facak sonuca [DataContract(IsReference=true)] attribute\u2019\u00fcn\u00fc ekleyerek bir bakal\u0131m. \u00d6ncelikle Customer modelimizi opt-in yakla\u015f\u0131m\u0131na g\u00f6re haz\u0131rlayal\u0131m:<\/p>\n<pre class=\"lang:c# decode:true \">[DataContract(IsReference = true)]\r\npublic class Customer\r\n{\r\n    public Customer()\r\n    {\r\n        Orders = new Collection&lt;Order&gt;();\r\n    }\r\n\r\n    [DataMember]\r\n    public int Id { get; set; }\r\n    [DataMember]\r\n    public string Name { get; set; }\r\n    [DataMember]\r\n    public string Surname { get; set; }\r\n    [DataMember]\r\n    public string Email { get; set; }\r\n    [DataMember]\r\n    public string PhoneNumber { get; set; }\r\n\r\n    [DataMember]\r\n    public ICollection&lt;Order&gt; Orders { get; set; }\r\n}<\/pre>\n<p>Modelimizi olu\u015fturduk ve \u015fimdi serialize i\u015flemi sonucunda olu\u015facak olan XML \u00e7\u0131kt\u0131s\u0131na bir bakal\u0131m:<\/p>\n<pre class=\"lang:js decode:true \">&lt;Customer xmlns:i=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:z=\"http:\/\/schemas.microsoft.com\/2003\/10\/Serialization\/\" xmlns=\"http:\/\/schemas.datacontract.org\/2004\/07\/JSONSerialization.Models\" z:Id=\"i1\"&gt;\r\n  &lt;Email&gt;gokhan@gokalp.com&lt;\/Email&gt;\r\n  &lt;Id&gt;1&lt;\/Id&gt;\r\n  &lt;Name&gt;G\u00f6khan&lt;\/Name&gt;\r\n  &lt;Orders&gt;\r\n    &lt;Order&gt;\r\n      &lt;BasketId&gt;1&lt;\/BasketId&gt;\r\n      &lt;Customer z:Ref=\"i1\"\/&gt;\r\n      &lt;Id&gt;1&lt;\/Id&gt;\r\n      &lt;OrderDate&gt;2015-11-07T00:00:00+03:00&lt;\/OrderDate&gt;\r\n    &lt;\/Order&gt;\r\n  &lt;\/Orders&gt;\r\n  &lt;PhoneNumber&gt;09999999999&lt;\/PhoneNumber&gt;\r\n  &lt;Surname&gt;G\u00f6kalp&lt;\/Surname&gt;\r\n&lt;\/Customer&gt;<\/pre>\n<p>XML \u00e7\u0131kt\u0131s\u0131nda g\u00f6rd\u00fc\u011f\u00fcm\u00fcz \u00fczere \u201cz:Id\u201d ve \u201cz:Ref\u201d attribute\u2019leri \u00fczerinde referans de\u011ferleri tutulmaktad\u0131r.<\/p>\n<p>Umar\u0131m faydal\u0131 bir makale olmu\u015ftur.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Merhaba arkada\u015flar. Y\u0131lba\u015f\u0131ndan sonra \u00e7\u0131kacak olan Asp.Net Web API kitab\u0131m\u0131za odakland\u0131\u011f\u0131m i\u00e7in bu aralar fazla makale yazam\u0131yorum. Fakat e-mail arac\u0131l\u0131\u011f\u0131 ile gelen sorular ve benimde bir ka\u00e7 projede kar\u015f\u0131 kar\u015f\u0131ya gelmem nedeniyle &#8220;Self referencing loop detected&#8221;\u00a0problemini nas\u0131l handle\u00a0edebilece\u011fimizi\u00a0kitab\u0131n bir b\u00f6l\u00fcm\u00fcnden alarak makale olarak koymak\u00a0istedim. :)&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/gokhan-gokalp.com\/tr\/asp-net-web-apida-circular-reference-handling\/\">Devam\u0131n\u0131 okuyun<span class=\"screen-reader-text\">Asp.NET Web API\u2019da Circular Reference Handling<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[138,139,140],"class_list":["post-479","post","type-post","status-publish","format-standard","hentry","category-asp-net-web-api","tag-asp-net-web-api-circular-reference-handling","tag-loop-reference-handling","tag-self-referencing-loop-detected","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"tr","enabled_languages":["en","tr"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"tr":{"title":false,"content":false,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Asp.NET Web API\u2019da Circular Reference Handling - G\u00f6khan G\u00f6kalp<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Asp.NET Web API\u2019da Circular Reference Handling - G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/\" \/>\n<meta property=\"og:site_name\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-07T18:29:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-11-07T18:51:01+00:00\" \/>\n<meta name=\"author\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/\"},\"author\":{\"name\":\"G\u00f6khan G\u00f6kalp\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"headline\":\"Asp.NET Web API\u2019da Circular Reference Handling\",\"datePublished\":\"2015-11-07T18:29:53+00:00\",\"dateModified\":\"2015-11-07T18:51:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/\"},\"wordCount\":705,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"keywords\":[\"Asp.Net Web Api Circular Reference Handling\",\"Loop Reference Handling\",\"Self referencing loop detected\"],\"articleSection\":[\"Asp.Net Web API\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/\",\"name\":\"Asp.NET Web API\u2019da Circular Reference Handling - G\u00f6khan G\u00f6kalp\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\"},\"datePublished\":\"2015-11-07T18:29:53+00:00\",\"dateModified\":\"2015-11-07T18:51:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/asp-net-web-apida-circular-reference-handling\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Asp.NET Web API\u2019da Circular Reference Handling\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"description\":\"C# &amp; Python lover\",\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gokhan-gokalp.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"pronouns\":\"he\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1777985325\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1777985325\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1777985325\",\"caption\":\"G\u00f6khan G\u00f6kalp\"},\"logo\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1777985325\"},\"sameAs\":[\"https:\\\/\\\/gokhan-gokalp.com\"],\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/tr\\\/author\\\/gok-gokalp\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Asp.NET Web API\u2019da Circular Reference Handling - G\u00f6khan G\u00f6kalp","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/","og_locale":"tr_TR","og_type":"article","og_title":"Asp.NET Web API\u2019da Circular Reference Handling - G\u00f6khan G\u00f6kalp","og_url":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/","og_site_name":"G\u00f6khan G\u00f6kalp","article_published_time":"2015-11-07T18:29:53+00:00","article_modified_time":"2015-11-07T18:51:01+00:00","author":"G\u00f6khan G\u00f6kalp","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"G\u00f6khan G\u00f6kalp","Tahmini okuma s\u00fcresi":"5 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/#article","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/"},"author":{"name":"G\u00f6khan G\u00f6kalp","@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"headline":"Asp.NET Web API\u2019da Circular Reference Handling","datePublished":"2015-11-07T18:29:53+00:00","dateModified":"2015-11-07T18:51:01+00:00","mainEntityOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/"},"wordCount":705,"commentCount":2,"publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"keywords":["Asp.Net Web Api Circular Reference Handling","Loop Reference Handling","Self referencing loop detected"],"articleSection":["Asp.Net Web API"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/","url":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/","name":"Asp.NET Web API\u2019da Circular Reference Handling - G\u00f6khan G\u00f6kalp","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/#website"},"datePublished":"2015-11-07T18:29:53+00:00","dateModified":"2015-11-07T18:51:01+00:00","breadcrumb":{"@id":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gokhan-gokalp.com\/asp-net-web-apida-circular-reference-handling\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gokhan-gokalp.com\/"},{"@type":"ListItem","position":2,"name":"Asp.NET Web API\u2019da Circular Reference Handling"}]},{"@type":"WebSite","@id":"https:\/\/gokhan-gokalp.com\/#website","url":"https:\/\/gokhan-gokalp.com\/","name":"G\u00f6khan G\u00f6kalp","description":"C# &amp; Python lover","publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gokhan-gokalp.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe","name":"G\u00f6khan G\u00f6kalp","pronouns":"he","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1777985325","url":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1777985325","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1777985325","caption":"G\u00f6khan G\u00f6kalp"},"logo":{"@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1777985325"},"sameAs":["https:\/\/gokhan-gokalp.com"],"url":"https:\/\/gokhan-gokalp.com\/tr\/author\/gok-gokalp\/"}]}},"_links":{"self":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/comments?post=479"}],"version-history":[{"count":4,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/479\/revisions"}],"predecessor-version":[{"id":485,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/479\/revisions\/485"}],"wp:attachment":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media?parent=479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/categories?post=479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/tags?post=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}