/
EntityPropertyMappingAttribute.xml
392 lines (357 loc) · 30.5 KB
/
EntityPropertyMappingAttribute.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<Type Name="EntityPropertyMappingAttribute" FullName="System.Data.Services.Common.EntityPropertyMappingAttribute">
<TypeSignature Language="C#" Value="public sealed class EntityPropertyMappingAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit EntityPropertyMappingAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:System.Data.Services.Common.EntityPropertyMappingAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class EntityPropertyMappingAttribute
Inherits Attribute" />
<TypeSignature Language="F#" Value="type EntityPropertyMappingAttribute = class
 inherit Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class EntityPropertyMappingAttribute sealed : Attribute" />
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Attribute that specifies a custom mapping between properties of an entity type and elements of an entry in a feed returned by WCF Data Services.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.Services.Common.EntityPropertyMappingAttribute> is used to define custom feed mapping in the data model of a reflection provider. This attribute is also 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 [Feed Customization](/dotnet/framework/data/wcf/feed-customization-wcf-data-services).
## Examples
In the following example, both properties of the `Order` type are mapped to existing feed elements. The `Product` property of the `Item` type is mapped to a custom feed attribute in a separate namespace.
:::code language="csharp" source="~/snippets/csharp/System.Data.Services.Common/EntityPropertyMappingAttribute/Overview/orderitems.svc.cs" id="Snippetcustomiqueryablefeeds":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/astoria_custom_feeds/vb/orderitems.svc.vb" id="Snippetcustomiqueryablefeeds":::
The previous example returns the following result for the URI `http://myservice/OrderItems.svc/Orders(0)?$expand=Items`.
:::code language="xml" source="~/snippets/xml/VS_Snippets_Misc/astoria_custom_feeds/xml/iqueryablefeedresultinline.xml" id="Snippetiqueryablefeedresultinline":::
]]></format>
</remarks>
<related type="Article" href="/dotnet/framework/data/wcf/create-a-data-service-using-rp-wcf-data-services">How to: Create a Data Service Using the Reflection Provider (WCF Data Services)</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates a new instance of the <see cref="T:System.Data.Services.Common.EntityPropertyMappingAttribute" />.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EntityPropertyMappingAttribute (string sourcePath, System.Data.Services.Common.SyndicationItemProperty targetSyndicationItem, System.Data.Services.Common.SyndicationTextContentKind targetTextContentKind, bool keepInContent);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string sourcePath, valuetype System.Data.Services.Common.SyndicationItemProperty targetSyndicationItem, valuetype System.Data.Services.Common.SyndicationTextContentKind targetTextContentKind, bool keepInContent) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.Services.Common.EntityPropertyMappingAttribute.#ctor(System.String,System.Data.Services.Common.SyndicationItemProperty,System.Data.Services.Common.SyndicationTextContentKind,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (sourcePath As String, targetSyndicationItem As SyndicationItemProperty, targetTextContentKind As SyndicationTextContentKind, keepInContent As Boolean)" />
<MemberSignature Language="F#" Value="new System.Data.Services.Common.EntityPropertyMappingAttribute : string * System.Data.Services.Common.SyndicationItemProperty * System.Data.Services.Common.SyndicationTextContentKind * bool -> System.Data.Services.Common.EntityPropertyMappingAttribute" Usage="new System.Data.Services.Common.EntityPropertyMappingAttribute (sourcePath, targetSyndicationItem, targetTextContentKind, keepInContent)" />
<MemberSignature Language="C++ CLI" Value="public:
 EntityPropertyMappingAttribute(System::String ^ sourcePath, System::Data::Services::Common::SyndicationItemProperty targetSyndicationItem, System::Data::Services::Common::SyndicationTextContentKind targetTextContentKind, bool keepInContent);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="sourcePath" Type="System.String" />
<Parameter Name="targetSyndicationItem" Type="System.Data.Services.Common.SyndicationItemProperty" />
<Parameter Name="targetTextContentKind" Type="System.Data.Services.Common.SyndicationTextContentKind" />
<Parameter Name="keepInContent" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="sourcePath">The name of the property, as string, of the entity type that is mapped to the specified property of the feed item.</param>
<param name="targetSyndicationItem">A <see cref="T:System.Data.Services.Common.SyndicationItemProperty" /> value that represents the element in the feed to which to map the property. This value must be set to <c>None</c> if the <see cref="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath" /> is not <see langword="null" />.</param>
<param name="targetTextContentKind">A <see cref="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetTextContentKind" /> value that identifies the format of the content to display in the feed.</param>
<param name="keepInContent">Boolean value that is <see langword="true" /> when the property being mapped should appear both in its mapped-to location and in the content section of the feed.</param>
<summary>Creates a new instance of the <see cref="T:System.Data.Services.Common.EntityPropertyMappingAttribute" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EntityPropertyMappingAttribute (string sourcePath, string targetPath, string targetNamespacePrefix, string targetNamespaceUri, bool keepInContent);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string sourcePath, string targetPath, string targetNamespacePrefix, string targetNamespaceUri, bool keepInContent) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Data.Services.Common.EntityPropertyMappingAttribute.#ctor(System.String,System.String,System.String,System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (sourcePath As String, targetPath As String, targetNamespacePrefix As String, targetNamespaceUri As String, keepInContent As Boolean)" />
<MemberSignature Language="F#" Value="new System.Data.Services.Common.EntityPropertyMappingAttribute : string * string * string * string * bool -> System.Data.Services.Common.EntityPropertyMappingAttribute" Usage="new System.Data.Services.Common.EntityPropertyMappingAttribute (sourcePath, targetPath, targetNamespacePrefix, targetNamespaceUri, keepInContent)" />
<MemberSignature Language="C++ CLI" Value="public:
 EntityPropertyMappingAttribute(System::String ^ sourcePath, System::String ^ targetPath, System::String ^ targetNamespacePrefix, System::String ^ targetNamespaceUri, bool keepInContent);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="sourcePath" Type="System.String" />
<Parameter Name="targetPath" Type="System.String" />
<Parameter Name="targetNamespacePrefix" Type="System.String" />
<Parameter Name="targetNamespaceUri" Type="System.String" />
<Parameter Name="keepInContent" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="sourcePath">The name of the property of the entity type, as string, that is mapped to the specified property in the feed.</param>
<param name="targetPath">The name of the target, as string, in the resulting feed to which the property is mapped.</param>
<param name="targetNamespacePrefix">This parameter, together with <paramref name="targetNamespaceUri" />, specifies the namespace in which the <paramref name="targetPath" /> element exists.</param>
<param name="targetNamespaceUri">Specifies the namespace URI of the element, as string, specified by the <c>targetName</c> property.</param>
<param name="keepInContent">Boolean value that is <see langword="true" /> when the property being mapped should appear both in its mapped-to location and in the content section of the feed.</param>
<summary>Creates an instance of the <see cref="T:System.Data.Services.Common.EntityPropertyMappingAttribute" /> to map a property to a custom feed element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If neither `targetNamespacePrefix` nor `targetNamespaceUri` are specified, the `targetName` will be put in the default namespace. If `targetNamespacePrefix` is not specified, a prefix is autogenerated. If `targetNamespacePrefix` is specified, but `targetNamespaceUri` is not specified, an exception is thrown at construction time.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="KeepInContent">
<MemberSignature Language="C#" Value="public bool KeepInContent { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool KeepInContent" />
<MemberSignature Language="DocId" Value="P:System.Data.Services.Common.EntityPropertyMappingAttribute.KeepInContent" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property KeepInContent As Boolean" />
<MemberSignature Language="F#" Value="member this.KeepInContent : bool" Usage="System.Data.Services.Common.EntityPropertyMappingAttribute.KeepInContent" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool KeepInContent { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>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.</summary>
<value>A <see cref="T:System.Boolean" /> value that is <see langword="true" /> when the property is mapped into both locations in the feed; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the value of <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.KeepInContent%2A> is `true`, the feed is backward compatible with WCF Data Services client applications that use protocol version 1.0. When the value of <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.KeepInContent%2A> is `false`, the protocol version used by the data service must be 2.0 or later versions. For more information, see [Data Service Versioning](/dotnet/framework/data/wcf/data-service-versioning-wcf-data-services).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SourcePath">
<MemberSignature Language="C#" Value="public string SourcePath { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SourcePath" />
<MemberSignature Language="DocId" Value="P:System.Data.Services.Common.EntityPropertyMappingAttribute.SourcePath" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property SourcePath As String" />
<MemberSignature Language="F#" Value="member this.SourcePath : string" Usage="System.Data.Services.Common.EntityPropertyMappingAttribute.SourcePath" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ SourcePath { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the property of the syndication item that will be mapped to the specified element of the feed.</summary>
<value>String value that contains property name.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.SourcePath%2A> property cannot directly reference a complex type. For complex types, you must use a path expression where property names are separated by a backslash (`/`) character. For example, the following values are permitted for an entity type `Person` with an integer property `Age` and a complex property `Address`:
- `Age`
- `Address/Street`
The <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.SourcePath%2A> property cannot be set to a value that contains a space or any other character that is not valid in a property name.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TargetNamespacePrefix">
<MemberSignature Language="C#" Value="public string TargetNamespacePrefix { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string TargetNamespacePrefix" />
<MemberSignature Language="DocId" Value="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TargetNamespacePrefix As String" />
<MemberSignature Language="F#" Value="member this.TargetNamespacePrefix : string" Usage="System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ TargetNamespacePrefix { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a string value that, together with <see cref="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespaceUri" />, specifies the namespace in which the <see cref="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath" /> element exists.</summary>
<value>String value that contains the target namespace prefix.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If neither <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix%2A> nor <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespaceUri%2A> are specified, the <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath%2A> will be put in the default namespace. If <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix%2A> is not specified, a prefix is autogenerated. If <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix%2A> is specified, but <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespaceUri%2A> is not specified, an exception is thrown at construction time.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TargetNamespaceUri">
<MemberSignature Language="C#" Value="public string TargetNamespaceUri { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string TargetNamespaceUri" />
<MemberSignature Language="DocId" Value="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespaceUri" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TargetNamespaceUri As String" />
<MemberSignature Language="F#" Value="member this.TargetNamespaceUri : string" Usage="System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespaceUri" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ TargetNamespaceUri { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a string value that specifies the namespace URI of the element specified by the <see cref="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath" /> property.</summary>
<value>String that contains the namespace URI.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If mapping to non-syndication element/attribute, this property is the namespace for the target element/attribute.
If neither <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix%2A> nor <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespaceUri%2A> are specified, the <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath%2A> will be put in the default namespace. If <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix%2A> is not specified, a prefix is autogenerated. If <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix%2A> is specified, but <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespaceUri%2A> is not specified, an exception is thrown at construction time.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TargetPath">
<MemberSignature Language="C#" Value="public string TargetPath { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string TargetPath" />
<MemberSignature Language="DocId" Value="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TargetPath As String" />
<MemberSignature Language="F#" Value="member this.TargetPath : string" Usage="System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ TargetPath { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the custom target in the feed to which the property is mapped.</summary>
<value>String value with target XML element or attribute.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath%2A> property is set, the <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespaceUri%2A> and <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetNamespacePrefix%2A> properties must also be set.
The value of <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath%2A> must be `null` (`Nothing` in Visual Basic) when the value of the <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetSyndicationItem%2A> property is anything other than <xref:System.Data.Services.Common.SyndicationItemProperty.CustomProperty>.
<xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath%2A> must be a path expression in which nested elements are separated by a backslash (`/`) and attributes are specified by an ampersand (`@`). In the following example, the string `UnitsInStock/@ReorderLevel` maps a property value to an attribute named `ReorderLevel` on a child element named `UnitsInStock` of the root entry element.
:::code language="xml" source="~/snippets/xml/VS_Snippets_Misc/astoria_custom_feeds/xml/northwind.csdl" id="Snippetedmfeedmappedtoattributespecific":::
The <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath%2A> property cannot contain white space.
The <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath%2A> property is not expressed as a true XPath expression, but the specified element and attribute names must represent well-formed XML elements and attributes. An invalid value will cause an exception to occur when the data service is initialized.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TargetSyndicationItem">
<MemberSignature Language="C#" Value="public System.Data.Services.Common.SyndicationItemProperty TargetSyndicationItem { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Data.Services.Common.SyndicationItemProperty TargetSyndicationItem" />
<MemberSignature Language="DocId" Value="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetSyndicationItem" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TargetSyndicationItem As SyndicationItemProperty" />
<MemberSignature Language="F#" Value="member this.TargetSyndicationItem : System.Data.Services.Common.SyndicationItemProperty" Usage="System.Data.Services.Common.EntityPropertyMappingAttribute.TargetSyndicationItem" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Data::Services::Common::SyndicationItemProperty TargetSyndicationItem { System::Data::Services::Common::SyndicationItemProperty get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.Services.Common.SyndicationItemProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a property on the <see cref="T:System.ServiceModel.Syndication.SyndicationItem" /> class.</summary>
<value>A <see cref="T:System.ServiceModel.Syndication.SyndicationItem" /> object.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If mapping to syndication element, this property is the name of the syndication item.
This value must be set to `None` if the <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetPath%2A> is not null.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TargetTextContentKind">
<MemberSignature Language="C#" Value="public System.Data.Services.Common.SyndicationTextContentKind TargetTextContentKind { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Data.Services.Common.SyndicationTextContentKind TargetTextContentKind" />
<MemberSignature Language="DocId" Value="P:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetTextContentKind" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TargetTextContentKind As SyndicationTextContentKind" />
<MemberSignature Language="F#" Value="member this.TargetTextContentKind : System.Data.Services.Common.SyndicationTextContentKind" Usage="System.Data.Services.Common.EntityPropertyMappingAttribute.TargetTextContentKind" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Data::Services::Common::SyndicationTextContentKind TargetTextContentKind { System::Data::Services::Common::SyndicationTextContentKind get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Data.Services.Client</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.Services.Common.SyndicationTextContentKind</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the type of content of the property mapped by <see cref="T:System.Data.Services.Common.EntityPropertyMappingAttribute" />.</summary>
<value>A string that identifies the type of content in the feed element.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If mapping to syndication content, this property is the content type of syndication item.
When you specify a value of <xref:System.Data.Services.Common.SyndicationTextContentKind.Xhtml> for the <xref:System.Data.Services.Common.EntityPropertyMappingAttribute.TargetTextContentKind%2A> attribute, you must ensure that the property value contains properly formatted XML. The data service returns the value without performing any transformations. You must also ensure that any XML element prefixes in the returned XML have a namespace URI and prefix defined in the mapped feed.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>