IRelationCollectionAdd Method (IEntityRelation, String, String, JoinHint) |
Adds the passed in IEntityRelation instance to the list, under the aliases specified and will consider the relation's weakness
based on the hint value. The start entity gets no alias.
Namespace: SD.LLBLGen.Pro.ORMSupportClassesAssembly: SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.0.0.0 (5.0.0)
Syntax IEntityRelation Add(
IEntityRelation relationToAdd,
string aliasRelationStartEntity,
string aliasRelationEndEntity,
JoinHint hint
)
Function Add (
relationToAdd As IEntityRelation,
aliasRelationStartEntity As String,
aliasRelationEndEntity As String,
hint As JoinHint
) As IEntityRelation
Parameters
- relationToAdd
- Type: SD.LLBLGen.Pro.ORMSupportClassesIEntityRelation
IEntityRelation instance to add - aliasRelationStartEntity
- Type: SystemString
the alias for the start entity in the relation (Customer.Relations.OrderUsingCustomerID:
Customer is start entity). Alias is case sensitive - aliasRelationEndEntity
- Type: SystemString
the alias for the end entity in the relation (Customer.Relations.OrderUsingCustomerID:
Order is end entity). Alias is case sensitive - hint
- Type: SD.LLBLGen.Pro.ORMSupportClassesJoinHint
Hint to signal the join type for this relation. Overrules obeyWeakRelations, except when the hint is JoinHint.None.
Return Value
Type:
IEntityRelationthe added relation in the list, so you can chain commands on 1 line
Exceptions Exception | Condition |
---|
ArgumentException | when aliasRelationEndEntity or aliasRelationStartEntity are an empty string, null or otherwise unusable
alias (contains spaces) |
See Also