SDS
Version Support and Conditional Operations
[This document supports a preliminary release of a software product that may be changed substantially prior to final commercial release. This document is provided for informational purposes only.]
Conditional Operations using SOAP Interface (C#)
Each entity stored in Microsoft® SQL Data Services (SDS) has a Version metadata property. When you create an entity the system assigned version number is returned to you. Depending on REST or SOAP interfaces, your application receives this version value as follows:
-
In case of REST interface it is returned to you as
ETagresponse header field.
-
In case of SOAP interface the
VersionMatchproperty on theScopeobject contains the entity version information.
Conditional Updates
You can use the version information to perform conditional operations. For example:
-
Get entity only if server has updated version of the entity (client copy of the entity is stale)
-
Update entity only if server version of the entity being updated is same as client version.
-
Delete entity only if the version matches a specific version.
The mechanics of specifying a conditional operation depend on the interface you are using:
-
When using REST interface, you set the
If-MatchorIf-None-Matchrequest headers. For more information see, Conditional Operations using REST Interface (C#).
-
When using SOAP interface, you set the
VersionMatchproperty of theScopeobject. For more information see, Conditional Operations using SOAP Interface (C#).
See Also
Concepts
Conditional Operations using REST Interface (C#)Conditional Operations using SOAP Interface (C#)