tags:

views:

50

answers:

0

I have a OData End point. I am creating a proxy using the OData Metadata endpoint (datasvcutil.exe).

The proxy essentially contains the main DataServiceContext class and class is generated for each of the entity in the meta data.

Is there any way of inferring the set of HTTP methods exposed by the end point ? Suppose that the OData service exposes only Http Get and Http Post and no Http Delete.

My question is whether it is possible to infer all the Http Methods exposed by the data service end point.

Currently for deleting I call :

dataServiceContext.DeleteObject(customer); dataServiceContext.SaveChanges();

The above code would throw an exception when there is no Http Delete available in the end point. Instead if I could detect this then I could avoid calling DeleteObject.

Any thoughts ?

Thanks

Venki