Udostępnij za pośrednictwem


DataServiceContext.DataNamespace Property

Note: This API is now obsolete.

Gets or sets the XML namespace for data items, not metadata items, of an Atom payload.

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

Syntax

'Declaration
<ObsoleteAttribute("You cannot change the default data namespace for an OData service that supports version 3 of the OData protocol, or a later version.",  _
    False)> _
Public Property DataNamespace As String 
    Get 
    Set
'Usage
Dim instance As DataServiceContext 
Dim value As String 

value = instance.DataNamespace

instance.DataNamespace = value
[ObsoleteAttribute("You cannot change the default data namespace for an OData service that supports version 3 of the OData protocol, or a later version.", 
    false)]
public string DataNamespace { get; set; }
[ObsoleteAttribute(L"You cannot change the default data namespace for an OData service that supports version 3 of the OData protocol, or a later version.", 
    false)]
public:
property String^ DataNamespace {
    String^ get ();
    void set (String^ value);
}
[<ObsoleteAttribute("You cannot change the default data namespace for an OData service that supports version 3 of the OData protocol, or a later version.", 
    false)>]
member DataNamespace : string with get, set
function get DataNamespace () : String 
function set DataNamespace (value : String)

Property Value

Type: System.String
A string representing the XML namespace for data items of a payload in the ATOM format.

Remarks

The default value of this property is the default WCF Data Services namespace: https://schemas.microsoft.com/ado/2007/08/dataservices.

This property affects both the namespace that is used for parsing content from the data service and the namespace used to generate content sent to the data service.

See Also

Reference

DataServiceContext Class

System.Data.Services.Client Namespace