DataServiceContext.AddAndUpdateResponsePreference Property
Gets or sets whether the client requests that the data service return entity data in the response message to a change request.
Namespace: System.Data.Services.Client
Assembly: Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)
Syntax
'Declaration
Public Property AddAndUpdateResponsePreference As DataServiceResponsePreference
Get
Set
'Usage
Dim instance As DataServiceContext
Dim value As DataServiceResponsePreference
value = instance.AddAndUpdateResponsePreference
instance.AddAndUpdateResponsePreference = value
public DataServiceResponsePreference AddAndUpdateResponsePreference { get; set; }
public:
property DataServiceResponsePreference AddAndUpdateResponsePreference {
DataServiceResponsePreference get ();
void set (DataServiceResponsePreference value);
}
member AddAndUpdateResponsePreference : DataServiceResponsePreference with get, set
function get AddAndUpdateResponsePreference () : DataServiceResponsePreference
function set AddAndUpdateResponsePreference (value : DataServiceResponsePreference)
Property Value
Type: System.Data.Services.Client.DataServiceResponsePreference
A DataServiceResponsePreference object that determines whether to request a response form the data service.
Remarks
The AddAndUpdateResponsePreference property is used for HTTP POST, HTTP PUT, HTTP MERGE, and HTTP PATCH requests. This property setting determines whether the data service returns the inserted or updated entity in the body of the response message.
Setting the AddAndUpdateResponsePreference property to IncludeContent means that the Prefer header in the request is set to a value of return-content.
Setting the AddAndUpdateResponsePreference property to Default means that a Prefer header is not included in the request, and the client parses any entity included in the response message.
The client always parses the entry returned in the response message, even when the AddAndUpdateResponsePreference property to is set to a value of NoContent.
The Prefer header is supported in version 3 of the Open Data Protocol (OData) and later versions.