WCF DataService - Cancel Server Side Tab

We've created a simple web service using WCF Dataservices. This service is used by several applications.

In some cases, I would like to be able to validate the inserted message on the server side and undo the insert if the inserted object meets certain conditions.

I found that I could test the insert using the QueryInterceptor, but couldn't find a way to "Undo" the insert.

Is it possible to rollback the server side of the insert without throwing an exception?

+3


source to share


1 answer


you can just write DispatchMessageInspector and check the received message; and you can decide whether to execute it or not without throwing any exceptions.



+1


source







All Articles