I created a WebApi project with EF and when configured it for json response, it started giving me a json object of query (entity) with all the data in navigation properties. i switched off the lazy loading from EF and now i can see that my response does not contain any data from navigation entities. But still , there are few empty arrays been shown in response. how can i completly get rid of them?
beside that, json response is adding $.id attribute to my response, can we remove it as well?
{
$id: "1",
ChargePoints: [ ],
ChargerActionHistory: [ ],
ChargingBoxModels: null,
ChargingStations: null,
StatusCodes: null,
WallSettings: null,
Heartbeats: [ ],
PK_ChargingBoxID: 2,
FK_ChargingStationsID: 1,
FK_WallSettingsID: 1,
FK_StatusCodeID: 1,
FK_ChargingBoxModelID: 1,
DeviceID: "HUB399209-UK",
ChargingBoxName: "ArneCharger",
CSEndpoint: null,
CBEndpoint: null,
CSPort: null,
CBPort: null,
DeviceIP: null,
OperationalPhase: null,
HeartbeatInterval: 5,
MeterInterval: 10,
Notes: "test device",
CommissionedDate: "2016-05-23T13:52:07.193",
ExpiryDate: "2016-06-23T13:52:07.193",
isAuthenticated: true,
isPublic: true,
isActive: true,
Keys: "39c5f761-5c08-4b3d-9b88-adcfd75ss26b"
}