EntityPropertyMappingAttribute Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Attribute that specifies a custom mapping between properties of an entity type and elements of an entry in an AtomPub feed returned by the data service.

Inheritance Hierarchy

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)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True, Inherited := True)> _
Public NotInheritable Class EntityPropertyMappingAttribute _
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class EntityPropertyMappingAttribute : Attribute

The EntityPropertyMappingAttribute type exposes the following members.

Constructors

  Name Description
Public method EntityPropertyMappingAttribute(String, SyndicationItemProperty, SyndicationTextContentKind, Boolean) Creates a new instance of the EntityPropertyMappingAttribute.
Public method EntityPropertyMappingAttribute(String, String, String, String, Boolean) Creates an instance of the EntityPropertyMappingAttribute to map a property to a custom feed element.

Top

Properties

  Name Description
Public property KeepInContent Gets 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 property SourcePath Gets the name of the property of the syndication item that will be mapped to the specified element of the feed.
Public property TargetNamespacePrefix Gets a string value that, together with TargetNamespaceUri, specifies the namespace in which the TargetPathelement exists.
Public property TargetNamespaceUri Gets a string value that specifies the namespace URI of the element specified by the TargetPath property.
Public property TargetPath Gets the name of the custom target in the feed to which the property is mapped.
Public property TargetSyndicationItem Gets a property on the SyndicationItem class.
Public property TargetTextContentKind Gets the type of content of the property mapped by EntityPropertyMappingAttribute.

Top

Methods

  Name Description
Public method Equals Infrastructure. Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Returns the hash code for this instance. (Inherited from Attribute.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Match When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

The EntityPropertyMappingAttribute is applied to generated client data service 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).

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

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