Partager via


TSqlModel.GetObject(ModelTypeClass, ObjectIdentifier, DacQueryScopes) Method

Definition

Returns TSqlObjects of the specified objectType and id. Only top level ModelTypeClass types are supported by this method - the objectType parameter must be in the types returned from the TopLevelTypes method or the call will fail.

public Microsoft.SqlServer.Dac.Model.TSqlObject GetObject (Microsoft.SqlServer.Dac.Model.ModelTypeClass objectType, Microsoft.SqlServer.Dac.Model.ObjectIdentifier id, Microsoft.SqlServer.Dac.Model.DacQueryScopes queryScopes);
member this.GetObject : Microsoft.SqlServer.Dac.Model.ModelTypeClass * Microsoft.SqlServer.Dac.Model.ObjectIdentifier * Microsoft.SqlServer.Dac.Model.DacQueryScopes -> Microsoft.SqlServer.Dac.Model.TSqlObject
Public Function GetObject (objectType As ModelTypeClass, id As ObjectIdentifier, queryScopes As DacQueryScopes) As TSqlObject

Parameters

objectType
ModelTypeClass

Type filter. Must be in the list of ModelTypeClass types returned from the TopLevelTypes method or the call will fail.

id
ObjectIdentifier

Unique identity of TSqlObject to return.

queryScopes
DacQueryScopes

Scope filter for queried objects.

Returns

Single TSqlObject or null.

Exceptions

If the supplied objectType and id result in multiple TSqlObjects, or if the objectType is not a top level type.

If the supplied objectType is null.

If communication with the Microsoft.SqlServer.Dac.Model.TSqlObjectService fails.

Applies to