IModelInfoProviderCreateRelationTField Method |
Creates a new relation object from the information specified.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.11.0.0 (5.11.23.1114)
Syntax IEntityRelation CreateRelation<TField>(
RelationType typeOfRelation,
string mappedFieldName,
bool startEntityIsPkSide,
TField[] fields
)
where TField : IEntityFieldCore
Function CreateRelation(Of TField As IEntityFieldCore) (
typeOfRelation As RelationType,
mappedFieldName As String,
startEntityIsPkSide As Boolean,
fields As TField()
) As IEntityRelation
Parameters
- typeOfRelation
- Type: SD.LLBLGen.Pro.ORMSupportClassesRelationType
The type of relation. - mappedFieldName
- Type: SystemString
Name of the mapped field in the start entity onto this relation. - startEntityIsPkSide
- Type: SystemBoolean
Set to true if the start entity of the relation is the PK side of the relation. This is set in the generated code.
This property is true in 1:n relations and in 1:1 relations where the start entity is the PK side and the end entity is thus the
FK side. Required for determining which alias belongs to which entity. - fields
- Type: TField
the fields forming the relation. Field at index 0 is related to field at index 1, field at index 2 is related to field at index 3 etc.
Type Parameters
- TField
Return Value
Type:
IEntityRelationSee Also