Hi,
I am having a problem returning a JsonNetResult for an object when it is a property of another object, however when I fetch the object explicitly it works e.g.
JsonNetResult res = new JsonNetResult();
res.Formatting = Formatting.Indented;
res.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
res.Data = addressRepository.Get(7);
return res;
returns a valid result however
JsonNetResult res = new JsonNetResult();
res.Formatting = Formatting.Indented;
res.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
res.Data = businessRepository.Get(businessID).Address;
return res;
will return an empty object; as will
JsonNetResult res = new JsonNetResult();
res.Formatting = Formatting.Indented;
res.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
res.Data = addressRepository.Get(businessRepository.Get(businessID).Address.Id);
return res;`
even though the address and it's ID is exactly the same in each situation. Is there something really obvious I'm missing?