IModel.RelateAll Method
Namespace: NextDesign.Core
Description
Relates the specified model of this instance with all reference fields that can be associated with the specified model, and returns a collection of all associated instances added.
If a deleted model or a temporary proxy is specified as the model to be associated, no association will be performed.
If no association is performed, an empty collection will be returned.
This method excludes fields that do not meet the following constraints from being associated.
[Constraints to evaluate]
- Path constraint
- Type constraint
- Upper limit of multiplicity
- Operation possible
Arguments
Name | Type | Description |
---|---|---|
opposite | IModel | Model to associate with null cannot be specified. |
Return value
- IRelationshipCollection
Exceptions
Name | Exception class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | When null is specified for opposite |
Invalid operation | ExtensionInvalidOperationException | When the model itself is a deleted model or a temporary proxy |