IUpdatable Interface

An interface used to insert or update a resource by the HTTP POST method.

Namespace:  System.Data.Services
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

Syntax

'Declaration
Public Interface IUpdatable
'Usage
Dim instance As IUpdatable
public interface IUpdatable
public interface class IUpdatable
type IUpdatable =  interface end
public interface IUpdatable

The IUpdatable type exposes the following members.

Methods

  Name Description
Public method AddReferenceToCollection Adds the specified value to the collection.
Public method ClearChanges Cancels a change to the data.
Public method CreateResource Creates the resource of the specified type and that belongs to the specified container.
Public method DeleteResource Deletes the specified resource.
Public method GetResource Gets the resource of the specified type identified by a query and type name.
Public method GetValue Gets the value of the specified property on the target object.
Public method RemoveReferenceFromCollection Removes the specified value from the collection.
Public method ResetResource Resets the resource identified by the parameter resource to its default value.
Public method ResolveResource Returns the instance of the resource represented by the specified resource object.
Public method SaveChanges Saves all the changes that have been made by using the IUpdatable APIs.
Public method SetReference Sets the value of the specified reference property on the target object.
Public method SetValue Sets the value of the property with the specified name on the target resource to the specified property value.

Top

Remarks

The IUpdatable interface is resource independent. The methods that return objects representing resources can return anything.

The returned object is an opaque object that represents the resource. To use the reference to read or update a value, the same opaque object is passed back to IUpdatable.

Implementation of IUpdatable must track the mapping between this opaque object to the object it represents. When the resource is serialized and a common language runtime (CLR) instance of the correct type is needed, the ResolveResource method on IUpdatable is called with the opaque object.

To serialize the object, call the ResolveResource method on IUpdatable.

See Also

Reference

System.Data.Services Namespace