Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

EntityPropertyMappingAttribute Class

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.

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 TargetPathelement 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 methodEqualsInfrastructure. Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from Attribute.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodMatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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).

Silverlight

Supported in: 5, 4

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

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

Community Additions

ADD
Show:
© 2015 Microsoft