Reputation: 1436
I am developing a wcf Service in c# and I am searching for a way to make my Service methods or the Service itself as idempotent. Is there an easy way to do this by marking the Service with an attribute or something like that? If not does anybody have a code snippet for this?
Upvotes: 0
Views: 171
Reputation: 5551
There's no magic attribute that will make your service idempotent. It's up to your implementation to handle that. For example if your service performs an add to a database then you need to check for the object's existence prior to adding it so you don't add it twice to the db.
Upvotes: 2