While RIA services are very well suited for table operations and queries, I stick to one traditional update situation. UPSERT (update, if exist, still insert new):
First: I want to add a server record if the record does not already exist, otherwise, if it already exists, I want to update one of its current field values.
Secondly: I do not want to query the database from the client side to see if the record exists. I just want to call the "UpsertData" method for RIA services and add or update the server only.
I tried many options, the closest I used the [Update (UsingCustomMethod = true)] method, passing in a newly created (hence separate) Entity. When you call a method with my object, I get: "A custom method cannot be called on a separate object."
Suggestions on the best way to do this will be appreciated :)
source share