How to return the count of a 1 to many navigation property?
This doesn't work. (On client i get value 0).
The solution here is not bad:
[HttpGet]
public IQueryable<object> AccountsSummary()
{
return from t in _contextProvider.Context.Accounts
select
new
{
t,
ContactsCount = t.Contacts.Count()
};
}
But i think this will disable the odata capabilities to filter from client-side?
Thanks
Felix