How to use JayData with OData function import

Author: Robert Bonay June 20th, 2012

, ,

Functions with IQueryable return value were supported in previous JayData versions, JayData 1.1.0 supports the following return values:

Return value further querying
primitives (int, string) no
object known by the context no
IQueryable<primitiveType> no
IQueryable<knownType> yes
ICollection<primitiveType> no
ICollection<knownType> no

Accessing service methods defined with WebGet attributes are supported, but methods implemented with WebInvoke aren’t.

Server-side example:

Client-side example:

Client-side context can be generated by JaySvcUtil.

The generateServiceOperation() call above generates a function, which can be used similar to an EntitySet.

To provide backward-compatibilty, contexts generated with older JaySvcUtil version can be used without the need of modification. However upgrade is recommended, because old syntax will be obsolete in the future.

, ,