asp.net - OData DataServiceQuery deserialize only first element of collection -
on asp.net mvc5 application, have service reference odata api. i'm making call api, expanding child propertie, follows:
dataservicequery<cenariodeinvestimentocenario> querycenario; querycenario = context.cenariodeinvestimentocenario .expand("cenariodeinvestimentocenarioitem") .where(a => a.idaerodromo.equals(55)) dataservicequery<cenariodeinvestimentocenario>; queryoperationresponse<cenariodeinvestimentocenario> response = querycenario .includetotalcount() .execute() queryoperationresponse<cenariodeinvestimentocenario>;
this generates following query string:
localhost/myapi/cenariodeinvestimentocenario()?$filter=idaerodromo eq 55&$expand=cenariodeinvestimentocenarioitem
using query string browser, can correct result set of data follows on image bellow. notice cenariodeinvestimentocenarioitem collection:
however, inside asp.net application, on queryoperationresponse response object, first cenariodeinvestimentocenarioitem collection element, shown on pic below:
i have no idea why happening. i'm pretty new working odata , service reference, have no idea happening. can help-me please?
tx!