An entry without a type name was found, but no expected type was specified #948
Unanswered
raulandresduque
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I´m getting this error consuming a ODATA v3:
Microsoft.Data.OData.ODataException: 'An entry without a type name was found, but no expected type was specified. To allow entries without type information, the expected type must also be specified when the model is specified.'
Call is as simple as:
var cargos = await client.FindEntriesAsync("Cargos?$format=json&$top=5").ConfigureAwait(false);
Query using postman works fine.
I can see the service is called and returns the results, but the library cannot map it in the Dictionary, which is weird since it´s generic. At this moment, I´m not mapping to a typed object. Here is the JSON returned:
{"d":{"results":[{"Cargo":"ABASTECIMIENTO","IdCargo":1},{"Cargo":"ADMINISTRADOR DE SISTEMAS","IdCargo":2},{"Cargo":"ADMINISTRATIVO","IdCargo":3},{"Cargo":"AGENTE DE VIGILANCIA","IdCargo":4},{"Cargo":"ALMACENISTA","IdCargo":5}]}}
Note using typed confluent API, it worked:
Beta Was this translation helpful? Give feedback.
All reactions