IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityRelation Class > EntityRelation Constructor : EntityRelation Constructor(Type,Type,Multiplicity,Multiplicity,OnDeleteMode,OnDeleteMode,String,Boolean) |
'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)
Exception | Description |
---|---|
System.ArgumentException | Relation names must be universally unique. |
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.
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