I have this DTO class:
public class TestClass
{
public int Id {get; set;}
public Dictionary<string, InnerClass> Values {get; set;}
}
public class InnerClass
{
public int Id {get; set;}
public string Name {get; set;}
}
However, when I pass following JSON as a parameter to a Controller, Values is empty:
{
"id": 1,
"values": {
"fistkey":{
"id": 3,
"name":"firstname"
},
"secondkey":{
"id": 4,
"name":"secondname"
}
}
}
Do I need a custom value provider or how could I make it populate Values property?
EDIT: Changed the example to more accurate represent my use case. The original example was overly simplified.