How to apply MaxExpansionDepth globally or to an entire controller in the wind

I found this SO: MaxExpansionDepth answer with latest webapi and breezes

But this only applies to one method on the controller. Applying the BreezeQueryable attribute to the controller itself breaks the entire controller at runtime with this exception: Token PropertyName in ArrayStart state will result in an invalid JSON object. Way ".

This is presumably because not all methods of my (large) bridge controller return IQueryable.

So how do I change MaxExpansionDepth for my entire breeze controller? The BreezeControllerAttribute seems to accept all the parameters of the BreezeQueryableAttribute EXCEPT MaxExpansionDepth.

Thanks Mathias

0
breeze
source share
2 answers

We can examine the proposed Web API Queryable attributes on the BreezeControllerAttribute and apply your settings as default values ​​when we qualify the controller query methods. Please vote for it in the "User Voice" section.

Meanwhile, you know that it is open source. You can implement your own version of BreezeControllerAttribute .

0
source share

I sent a transfer request to add MaxExpansionDepth to the controller, and not to each method. https://github.com/IdeaBlade/Breeze/pull/35

0
source share

All Articles