DevForce Help Reference
EntityRelation Constructor(Type,Type,Multiplicity,Multiplicity,OnDeleteMode,OnDeleteMode,String,Boolean)


Role1 entity type
Role2 entity type
Multiplicity of the role1 end
Multiplicity of the role2 end
Action to take upon delete of a role1 entity
Action to take upon delete of a role2 entity
The non-namespace qualified name representing the role1/role2 relation.
Initialize a new instance of the EntityRelation class.
Syntax
'Declaration
 
Public Function New( _
   ByVal role1Type As Type, _
   ByVal role2Type As Type, _
   ByVal role1Multiplicity As Multiplicity, _
   ByVal role2Multiplicity As Multiplicity, _
   ByVal role1OnDeleteMode As OnDeleteMode, _
   ByVal role2OnDeleteMode As OnDeleteMode, _
   ByVal relationName As String, _
   Optional ByVal shouldUpdateMetadataStore As Boolean _
)
'Usage
 
Dim role1Type As Type
Dim role2Type As Type
Dim role1Multiplicity As Multiplicity
Dim role2Multiplicity As Multiplicity
Dim role1OnDeleteMode As OnDeleteMode
Dim role2OnDeleteMode As OnDeleteMode
Dim relationName As String
Dim shouldUpdateMetadataStore As Boolean
 
Dim instance As New EntityRelation(role1Type, role2Type, role1Multiplicity, role2Multiplicity, role1OnDeleteMode, role2OnDeleteMode, relationName, shouldUpdateMetadataStore)

Parameters

role1Type
Role1 entity type
role2Type
Role2 entity type
role1Multiplicity
Multiplicity of the role1 end
role2Multiplicity
Multiplicity of the role2 end
role1OnDeleteMode
Action to take upon delete of a role1 entity
role2OnDeleteMode
Action to take upon delete of a role2 entity
relationName
The non-namespace qualified name representing the role1/role2 relation.
shouldUpdateMetadataStore
Exceptions
ExceptionDescription
System.ArgumentExceptionRelation names must be universally unique.
Remarks
EntityRelations are automatically generated by the DevForce Object Mapping tool, and you will not usually need to construct additional instances. You can retrieve one or more EntityRelations using one of the GetEntityRelations overloads.

Note that the role1Type and role2Type cannot necessarily be inferred from role1Properties and role2Properties because of type inheritence. For example, the role1Type may be a subclass of the role1Properties[0].EntityType.

The relation name provided here should not be namespace-qualified. Namespace qualifiers are added automatically at run time to ensure that relation names are unique across all models loaded.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityRelation Class
EntityRelation Members
Overload List

Send Feedback