EntitySetController currently returns an IQueryable<T> for its Get() function. When supplying the $select query, it'll throw an ArgumentException stating that it is unable to convert the SelectExpandWrapper to IQueryable.
I suppose the function should be changed to return an IEnumerable instead and set the QueryableAttribute on it.
I also think the functions that return T should be adapted to utilize SingleResult<T>?
Comments: I think you misread what I said; if you use the EntitySetController<TEntity, TKey> class' Get function, which returns an IQueryable<TEntity> and call that function using either $expand and/or $select, it'll throw an ArgumentException. SelectExpandWrapper, which is the object that is created due to using $select or $expand, can't be converted to an IQueryable<TEntity>. For it to work properly, you need to change the function to return IEnumerable<TEntity> instead. (and then, as far as I know, you'll have to now explicitly set the QueryableAttribute which isn't required if the function returns IQueryable)
I suppose the function should be changed to return an IEnumerable instead and set the QueryableAttribute on it.
I also think the functions that return T should be adapted to utilize SingleResult<T>?
Comments: I think you misread what I said; if you use the EntitySetController<TEntity, TKey> class' Get function, which returns an IQueryable<TEntity> and call that function using either $expand and/or $select, it'll throw an ArgumentException. SelectExpandWrapper, which is the object that is created due to using $select or $expand, can't be converted to an IQueryable<TEntity>. For it to work properly, you need to change the function to return IEnumerable<TEntity> instead. (and then, as far as I know, you'll have to now explicitly set the QueryableAttribute which isn't required if the function returns IQueryable)