I have an entity like so
public class Permission
{
IEnumerable<Permission> Children {get;set;}
}
How to specify an expand query that goes as deep as is needed, currently i am using
public IEnumerable<IManagePermission> GetRootPermissions()
{
return this.adminService.ManagePermissionViews.Expand("Children/Children/Children/Children").Where(item=>item.ParentPermissionId == null);
}
But this is sucky as i have no idea really how deep the permissions may be nested, i considered calling another query to find this out first then using this value to construct the nested argument.
But again .. sucky..