This project is read-only.

OData $select & $expand

  1. QueryableAttribute would stash the SelectExpand clause on the request for the OData formatter to use.
  2. QueryableAttribue would apply the SelectExpand clause on the object returned from the action. This is the place where we generate LINQ select queries and Includes.
    • First cut - would do nothing. Just returns the object. Works if the backend is Linq2Objects and the formatter is OData formatter.
    • Second cut - Apply the Selects to prune the object graph so that other formatters can serialize appropriately.
    • Third cut - Optimize $select and $expand query to use minimum number of fields required and not depend on lazy loading.
  3. OData formatter would use the SelectExpand clause stashed by the QueryableAttribute on the request to write the response graph.
    • First cut - assume that object being written is complete and is not an IEdmObject.
    • Second cut - Add support for writing IEdmObject's.
  4. Once the ODataFormatter, (specifiacally the ODataEntityTypeSerializer) starts supporting writing IEdmObject, we don't have an instance of T to build EntityInstanceContext<T>. This is required for url generation. We would fix our default link generators (conventional model builder) to use IEdmObject. But, if someone customized link generation, it could be a breaking change. We decided to lazily create an instance of T from IEdmObject to not break those people. Consider deprecating that property though.
  5. Supporting $select and $expand on actions returning single entities is parked for now i.e actions like public GetCustomer(int key);
  1. Model builder will have a way to provide page size per entity set. We would use the page size specified closest to the action i.e QueryableAttribute page size trumps model page size.

Last edited Mar 29, 2013 at 10:09 PM by raghuramn, version 1


No comments yet.