TSqlObject.GetReferencedRelationshipInstances Method (ModelRelationshipClass, DacQueryScopes)
For objects referenced by this TSqlObject with a specific ModelRelationshipClass, returns the ModelRelationshipInstance defining the relationship data. This will include the referenced object if it exists, the ObjectIdentifier used to identify the referenced object, and any properties specific to this relationship. Only objects within the specified DacQueryScopes scope will be returned. To return non-composite or system references the GetReferencedRelationshipInstances(DacExternalQueryScopes) method should be called instead.
Namespace: Microsoft.SqlServer.Dac.Model
Assembly: Microsoft.SqlServer.Dac.Extensions (in Microsoft.SqlServer.Dac.Extensions.dll)
Syntax
'Declaration
Public Function GetReferencedRelationshipInstances ( _
relationshipType As ModelRelationshipClass, _
queryScopes As DacQueryScopes _
) As IEnumerable(Of ModelRelationshipInstance)
'Usage
Dim instance As TSqlObject
Dim relationshipType As ModelRelationshipClass
Dim queryScopes As DacQueryScopes
Dim returnValue As IEnumerable(Of ModelRelationshipInstance)
returnValue = instance.GetReferencedRelationshipInstances(relationshipType, _
queryScopes)
public IEnumerable<ModelRelationshipInstance> GetReferencedRelationshipInstances(
ModelRelationshipClass relationshipType,
DacQueryScopes queryScopes
)
public:
IEnumerable<ModelRelationshipInstance^>^ GetReferencedRelationshipInstances(
ModelRelationshipClass^ relationshipType,
DacQueryScopes queryScopes
)
member GetReferencedRelationshipInstances :
relationshipType:ModelRelationshipClass *
queryScopes:DacQueryScopes -> IEnumerable<ModelRelationshipInstance>
public function GetReferencedRelationshipInstances(
relationshipType : ModelRelationshipClass,
queryScopes : DacQueryScopes
) : IEnumerable<ModelRelationshipInstance>
Parameters
- relationshipType
Type: Microsoft.SqlServer.Dac.Model.ModelRelationshipClass
ModelRelationshipClass defining the relationship class to query for.
- queryScopes
Type: Microsoft.SqlServer.Dac.Model.DacQueryScopes
DacQueryScopes defining the scope objects must exist in.
Return Value
Type: System.Collections.Generic.IEnumerable<ModelRelationshipInstance>
ModelRelationshipInstance defining the relationships between this TSqlObject and the objects referenced by it.
Remarks
The Object field may be null if the element is not in the TSqlModel. In these cases the ObjectName field can be used to query information about the referenced object.