I have an WebApi OData endpoint that I'm querying with BreezeJS, and I'm having an issue with the json payload. When I query the endpoint with BreezeJS, as opposed to directly querying the endpoint via url, the json payload is ~2x, and it appears to be because the response includes full metadata.
Example, querying with Breeze:
{
"Entity": {
"Id": 3,
"LegacyId": 21,
"Type": "Company",
"odata.id": "http://localhost/odata/Entities(3)",
"odata.type": "Test.Models.Entity"
},
"[email protected]": "http://localhost/odata/Answers(2)/Entity",
"Question": {
"Id": 1,
"Name": "Name",
"Type": "string",
"odata.id": "http://localhost/odata/Questions(1)",
"odata.type": "Test.Models.Question"
},
"[email protected]": "http://localhost/odata/Answers(2)/Question",
"EntityId": 3,
"Id": 2,
"Modified": "2015-05-22T14:56:26.477",
"[email protected]": "Edm.DateTime",
"QuestionId": 1,
"Value": "Some Company Name",
"odata.id": "http://localhost/odata/Answers(2)",
"odata.type": "Test.Models.Answer"
}
Contrasted with querying http://localhost/odata/Answers(3):
{
"Entity": {
"Id": 3,
"LegacyId": 21,
"Type": "Company"
},
"Question": {
"Id": 1,
"Name": "Name",
"Type": "string"
},
"EntityId": 3,
"Id": 2,
"Modified": "2015-05-22T14:56:26.477",
"QuestionId": 1,
"Value": "Some Company Name"
}
Is there any way to return the minimal metadata through the BreezeJS query?