Model looks like this:
public class Foo
{
public long Id { get; set; }
public ExpandoObject Attributes { get; set; }
}
What I get as a result from Web API call:
[
{
Id: 1,
Attribute1: "XYZ",
Attributes: "ABC"
}
]
What I expect to get:
[
{
Id: 1,
Attributes:
{
Attribute1: "XYZ",
Attributes: "ABC"
}
}
]
Controller action returns IQueryable.
public IQueryable<Foo> Get()
{
var result = ...;
return result.AsQueryable();
}
result
variable is a collection of Foo objects.
Could anybody explain why does it happen?