My ApiController is supposed to return data:
// GET api/profile
public IEnumerable<HubBasicProfile> GetProjectProfiles()
{
IEnumerable<HubBasicProfile> res = _bpss.GetAllBasicProfiles();
return res;
}
When I debug and inspect res before it is returned, it has data for 91 HubBasicProfile objects.
However, when the data is returned, I see 91 {}, empty objects. No data at all.
Anybody any clue why this might be?
Thanks
Eric
call the
ToList()method. So deferred execution won’t happen.EDIT : As per the comment
If you are serializing these items, You need to make sure your class is marked as serializable / has the [
DataMember]/[DataContract]Attributes.