views:

33

answers:

1

We have an Entity Data Model which is used by a WCF Data Service that needs to run some business logic after persisting an entity to the database. In this case it needs to pass the id generated for the persisted entity to another service via a WCF web service call.

The question is how do we run some business logic after saving the entity. Part of this business logic will be a call to another web service with the generated id.

Thanks in advance.

A: 

Sorry, perhaps I am not understanding the question properly, but could you not simply use an interceptor?

Interceptors (WCF Data Services)

Jon Archway
Hi Jon, thanks for your answer. We've looked at interceptors but there's no interceptor that will run after you've saved an entity to the database. You can intercept a request to change an entity (update, change etc) but not fire some code after the actual change. We'd need to do this as we only have the new id after saving it.
Col