If you override CreateEntity and do not override GetKey, you get an obscure error when calling the service:
{
"odata.error":{
"code":"POST requests are not supported.","message":{
"lang":"en-US","value":"Extracting the key from entity instances is not supported for this entity set."
}
}
}
This is because CreateEntity calls GetKey under the covers. The XML Doc comments on CreateEntity should document the dependency and the fact that you have to override both.
{
"odata.error":{
"code":"POST requests are not supported.","message":{
"lang":"en-US","value":"Extracting the key from entity instances is not supported for this entity set."
}
}
}
This is because CreateEntity calls GetKey under the covers. The XML Doc comments on CreateEntity should document the dependency and the fact that you have to override both.