A Sandcastle Documented Class Library

# Relationship AddRelationshipKey Method (String, String)

Adds a new relationship key to the current instance. The operation is allowed only if the relationship category is not Native. The category is subsequently changed automatically UserDefined.

Namespace: Dundas.BI.Data.Relationships
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    public RelationshipKey AddRelationshipKey(
    	string elementName,
    	string referencedElementName
    )

    Public Function AddRelationshipKey (
    	elementName As String,
    	referencedElementName As String
    ) As RelationshipKey

    public:
    RelationshipKey AddRelationshipKey(
    	String^ elementName,
    	String^ referencedElementName
    )

    member AddRelationshipKey :
            elementName : string *
            referencedElementName : string -> RelationshipKey

#### Parameters

elementName
  Type: System
  String
  The element name from the relationship primary structure.
referencedElementName
  Type: System
  String
  The referenced element name from the relationship referenced structure.

#### Return Value

Type: RelationshipKey
The relationship key.
Exceptions

Exception | Condition
--- | ---
ArgumentException | elementName or referencedElementName is Empty or .
InvalidOperationException | The operation is not allowed for native relationships.

See Also

#### Reference

Relationship Class
AddRelationshipKey Overload
Dundas.BI.Data.Relationships Namespace