This topic has not yet been rated - Rate this topic

EntityPropertyMappingAttribute Class

July 26, 2012

Attribute that specifies a custom mapping between properties of an entity type and elements of an entry in an AtomPub feed returned by the Open Data Protocol (OData) service.

System.Object
  System.Attribute
    System.Data.Services.Common.EntityPropertyMappingAttribute

Namespace:  System.Data.Services.Common
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class EntityPropertyMappingAttribute : Attribute

The EntityPropertyMappingAttribute type exposes the following members.

  NameDescription
Public methodEntityPropertyMappingAttribute(String, SyndicationItemProperty, SyndicationTextContentKind, Boolean)Creates a new instance of the EntityPropertyMappingAttribute.
Public methodEntityPropertyMappingAttribute(String, String, String, String, Boolean)Creates an instance of the EntityPropertyMappingAttribute to map a property to a custom feed element.
Top
  NameDescription
Public propertyKeepInContentGets a Boolean value that indicates whether a property value should be repeated both in the content section of the feed and in the mapped location.
Public propertySourcePathGets the name of the property of the syndication item that will be mapped to the specified element of the feed.
Public propertyTargetNamespacePrefixGets a string value that, together with TargetNamespaceUri, specifies the namespace in which the TargetPath element exists.
Public propertyTargetNamespaceUriGets a string value that specifies the namespace URI of the element specified by the TargetPath property.
Public propertyTargetPathGets the name of the custom target in the feed to which the property is mapped.
Public propertyTargetSyndicationItemGets a property on the SyndicationItem class.
Public propertyTargetTextContentKindGets the type of content of the property mapped by EntityPropertyMappingAttribute.
Top
  NameDescription
Public methodEquals (Inherited from Attribute.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Attribute.)
Public methodGetType (Inherited from Object.)
Public methodMatch (Inherited from Attribute.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

The EntityPropertyMappingAttribute is applied to generated OData proxy classes when the metadata used to generate the classes indicates that custom feed mappings are defined in the data model. This information is necessary to make sure that the client can create and consume messages that support custom feeds. For more information, see Atom Feed Customization (WCF Data Services).

Windows Phone OS

Supported in: 7.1

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.