Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies To:# OData WebApi v7 for aspnet webapi supported
OData AspNet WebApi V7# OData Webapi for Webapi supported
OData AspNet WebApi V6
Since Web API OData V5.9.1, it corrected the behavior of MaxExpansionDepth of EnableQueryAttribute. MaxExpansionDepth means the max expansion depth for the $expand query option.
When MaxExpansionDepth value is 0, it means the check is disabled, but if you use $level=max at the same time, the expand depth will be a default value : 2
, to avoid the dead loop.
Let's see some samples about this behavior.
$expand=Manager($levels=max)
will be the same as
$expand=Manager($expand=Manager)
$expand=Manager($levels=3)
will be the same as
$expand=Manager($expand=Manager($expand=Manager))
Related Issue #731.