How can we improve WCF Data Services?

SaveChanges AND call Action in the same transaction

Now, as we can see in source code of BatchSaveResult.GenerateBatchRequest(), it is impossible to pass batch changes AND execute an Action in the same HTTP REQUEST.

I need WCF Data Services may support the following scenario:

On server, WCF Data Services are used as a basis for client/server communication. We use EntityFramework as ORM.

In business domain, there is OrderHead entity aggregating OrderLines.

There is a WPF form where user edits Order Head details AND make any changes to Order Lines in editable grid, including adding/deleting the lines. After that, user clicks button "Confirm Order". Server runs huge amount of logic over the CHANGED OrderHead+OrderLines data, and makes the the order readonly (changes its status)

For that scenario, on server I would expect to create an Action "ConfirmOrder" with the OrderHead as first parameter. And there, I would expect that all the changes made by user in the OrderHead AND in all its Lines are already in EntityFramework's ObjectContext.

The key requirement is that both saving of all the modifications AND running the "confirm" business logic must be IN THE SAME TRANSACTION, mainly because there may be race conditions between users doing different(!) operations on the same order, but not only.

16 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Roman Koreshkov shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base