I have a couple code which is responsible to post some data to web api. And I am trying to post a Dictionary. But the key property cannot be serialized when the request is posted.
There is my code :
response = await base.HttpClientInstance.PostAsJsonAsync<Dictionary<ItemDto, string>>(url, dummyItems);
There is fiddler session summary :
Content-Type: application/json; charset=utf-8
Host: debug.foo.foo.com
Content-Length: 78
Expect: 100-continue
Connection: Keep-Alive
{"Foo.Contract.Items.ItemDto":"87a0a711-6ecb-4ef5-9aed-04f7573344e1"}
Where is the problem, any idea?