Pretty sure that DataContext is LINQ to SQL, another ORM. I forgot about that one (dunno anyone who uses it cause the SQL it generates is horribad)
That would work too.
You need to understand the WebApi is the interface for extending your code to the public. By them saying they "support OData" it meerly means they translate the OData query options and invoke the appropriate stuff onto your IQueryable object.
Your IQueryable still must properly support all the query options. WebApi does not go to your database, the IQueryable does.
Do you mean you want to prevent the user from EVER specifying over a certain amount?
It's hard for me to translate because I have never used "SetPageSize".
It sounds more like this is your question:
"How do you prevent users from requesting too many records when implementing OData?"
For that... all I can say is create a request handler, set a breakpoint, and inspect the input and output parameters on the HttpRequestMessage when doing an OData request.
I would guess the only way, would be to read the proper input parameter (the top part), insert one at the max, if one does not exist, or set it to the max if its greater than the allowed value.
This is similar to how you can force media types. You make a message handler, remove all the accept properties from the headers, and add the ones they must support. (This is how I force every request to be JSON)