1 //---------------------------------------------------------------------
2 // <copyright file="EdmRelationshipNavigationPropertyAttribute.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 // @backupOwner Microsoft
8 //---------------------------------------------------------------------
11 namespace System
.Data
.Objects
.DataClasses
14 /// Attribute identifying the Ends defined for a RelationshipSet
15 /// Implied default AttributeUsage properties Inherited=True, AllowMultiple=False,
16 /// The metadata system expects this and will only look at the first of each of these attributes, even if there are more.
18 [System
.Diagnostics
.CodeAnalysis
.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId
= "Edm")]
19 [AttributeUsage(AttributeTargets
.Property
)]
20 public sealed class EdmRelationshipNavigationPropertyAttribute
: EdmPropertyAttribute
22 private string _relationshipNamespaceName
;
23 private string _relationshipName
;
24 private string _targetRoleName
;
27 /// Attribute identifying the Ends defined for a RelationshipSet
29 public EdmRelationshipNavigationPropertyAttribute(string relationshipNamespaceName
, string relationshipName
, string targetRoleName
)
31 _relationshipNamespaceName
= relationshipNamespaceName
;
32 _relationshipName
= relationshipName
;
33 _targetRoleName
= targetRoleName
;
37 /// the namespace name of the relationship
39 public string RelationshipNamespaceName
41 get { return _relationshipNamespaceName; }
45 /// the relationship name
47 public string RelationshipName
49 get { return _relationshipName; }
53 /// the target role name
55 public string TargetRoleName
57 get { return _targetRoleName; }