1

Closed

Add parameter binder for supporting odata literal format.

description

OData urls can contain edm primitives. The string representation of these primitives is different than what webapi (and .NET) uses causing model binding errors.

For example, the url "http://localhost/Products('Microsoft Windows ')" with the route template "/Products({name})" is expected to map to the action, "Product Get(string name) { ... }".

Similarly, "http://localhost/Products(guid'12345678-aaaa-bbbb-cccc-ddddeeeeffff') with route template "/Products({id})" is expected to map to the action, "Product Get(Guid id)".

We have to add a parameter binder that understands odata literals and does the model binding appropriately.
Closed Oct 18, 2012 at 10:57 PM by hongyes
Verified in latest build

comments

HongmeiG wrote Aug 17, 2012 at 10:31 PM

Since we are producing the link with OData syntax, we should honor this format.