Modifying ChangeSet in RIA Services

Posted by Mohit on Stack Overflow See other posts from Stack Overflow or by Mohit
Published on 2010-04-28T17:44:59Z Indexed on 2010/04/28 17:47 UTC
Read the original article Hit count: 625

Filed under:
|

Hi,

I am using RIA Services Beta 2 with Linq2Sql and SL3. In my SL3, I have a datagrid where I can do some mappings of data (Updates, Inserts and Deletes). I override the Submit method when SubmitChanges() is called. In the submit method in the domain service, I do some validation. If a validation fails for a particular ChangeSetEntry in the ChangeSet, a ValidationErrors is added. Then I call the base.Submit(changeSet).

So, if the changeset has 3 entities and one of the entities results in validation error, the other 2 entities are also rolled back. It looks like, RIA Services does an implicit transaction and hence it either submits all 3 or none even if 2 out of 3 does not have any validation error. Is there a way for the RIA service, to prevent rollback of the valid entities and only invalidate the ones that has validation failed.

Inputs will be appreciated.

Thanks Mohit

© Stack Overflow or respective owner

Related posts about ria

Related posts about Services