Quick question: I use the autogenerate Client code for VB.net i noticed that in v4 i have difficulties updating a object. i get the exception No routing convention was found to select an action for the OData path with template '~/entityset/key'. I back traced this due to the fact that on SaveChanges the method PUT is passed while the backend expects PATCH instead. In OData v3 you had this option SaveChangesOptions.PatchOnUpdate but that's gone in v4. So i dived in deeper and noticed then when i change it to DataServiceCollection instead of DataServiceQuery the PUT/PATCH method seems to be correct.
So i was wondering why it is a DataServiceQuery instead of DataServiceCollection generated?
My knowledge about OData isn't expert so hopefully you could explain it in simple words :-)
In the meantime i'm using this dirty workarround to get it working:
If request.Method = Method.PUT.ToString Then request.Method = Method.PATCH.ToString
Quick question: I use the autogenerate Client code for VB.net i noticed that in v4 i have difficulties updating a object. i get the exception
No routing convention was found to select an action for the OData path with template '~/entityset/key'
. I back traced this due to the fact that on SaveChanges the method PUT is passed while the backend expects PATCH instead. In OData v3 you had this optionSaveChangesOptions.PatchOnUpdate
but that's gone in v4. So i dived in deeper and noticed then when i change it toDataServiceCollection
instead ofDataServiceQuery
the PUT/PATCH method seems to be correct.So i was wondering why it is a
DataServiceQuery
instead ofDataServiceCollection
generated?My knowledge about OData isn't expert so hopefully you could explain it in simple words :-)
In the meantime i'm using this dirty workarround to get it working:
If request.Method = Method.PUT.ToString Then request.Method = Method.PATCH.ToString