I have the below class which is exposed as oData service through a GET call
class Book
{
public string Id {get; set;}
public string Name {get; set;}
public Dynamicproperties Dictionary<string,object> {get; set;}
}
Assume an object of Book contains below data
new Book
{
Id="1",
Name = "oData",
new Dictioanry<string,object>
{
{ "chapter1",
new Dictionary<string,object>
{
"page1",
new Dictionary<string,object>
{
"topic", "introduction"
}
}
}
}
}
I could understand user can query properties of Book like http://localhost:1234/Books('1')/Name and to support this query i need to have getters for those properties inside my BooksController. But how can a user query the properties inside the nested dictionary. Suppose if the user wants to know value of topic of page1 of chapter1, how can a user query it ?. What should I do to support that query ?. I am not able to figure it out. I would appreciate any help.