This documentation is archived and is not being maintained.

TSqlModel.GetObjects Method

 

Updated: April 20, 2017

Returns all TSqlObjects.

Namespace:   Microsoft.SqlServer.Dac.Model
Assembly:  Microsoft.SqlServer.Dac.Extensions (in Microsoft.SqlServer.Dac.Extensions.dll)

NameDescription
System_CAPS_pubmethodGetObjects(DacQueryScopes, ModelTypeClass[])

Returns all TSqlObjects matching the list of typeFilters. Only top level ModelTypeClass types are supported by this method - all types in the typeFilterstype parameter must be present in the TopLevelTypes or the call will fail.

System_CAPS_pubmethodGetObjects(ModelTypeClass, ObjectIdentifier, DacQueryScopes)

Returns all TSqlObjects that match the ModelTypeClass and ObjectIdentifier. Only top level ModelTypeClass types are supported by this method - the objectTypetype parameter must be in the types returned from the TopLevelTypes method or the call will fail.

System_CAPS_pubmethodGetObjects(String, ModelTypeClass[])

Return to top

TSqlModel.GetObjects Method (DacQueryScopes, ModelTypeClass[])

Returns all TSqlObjects matching the list of typeFilters. Only top level ModelTypeClass types are supported by this method - all types in the typeFilterstype parameter must be present in the TopLevelTypes or the call will fail.

public IEnumerable<TSqlObject> GetObjects(
	DacQueryScopes queryScopes,
	params ModelTypeClass[] typeFilters
)

Parameters

queryScopes
Type: Microsoft.SqlServer.Dac.Model.DacQueryScopes

The scope filter for queried objects. Must be in the list of ModelTypeClass types returned from the TopLevelTypes method or the call will fail.

typeFilters
Type: Microsoft.SqlServer.Dac.Model.ModelTypeClass[]

The list of ModelTypeClasss to return.

Return Value

Type: System.Collections.Generic.IEnumerable<TSqlObject>

All TSqlObjects that match typeFilters.

Exception Condition
DacModelException

If any of the types in the typeFilters parameter are not a top level type.

RemotingException

If communication fails during remoting.

If no typeFilters are supplied all TSqlObjects are returned.

Return to top

TSqlModel.GetObjects Method (ModelTypeClass, ObjectIdentifier, DacQueryScopes)

Returns all TSqlObjects that match the ModelTypeClass and ObjectIdentifier. Only top level ModelTypeClass types are supported by this method - the objectTypetype parameter must be in the types returned from the TopLevelTypes method or the call will fail.

public IEnumerable<TSqlObject> GetObjects(
	ModelTypeClass objectType,
	ObjectIdentifier id,
	DacQueryScopes queryScopes
)

Parameters

objectType
Type: Microsoft.SqlServer.Dac.Model.ModelTypeClass

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

id
Type: Microsoft.SqlServer.Dac.Model.ObjectIdentifier

The identity of the TSqlObjects to return.

queryScopes
Type: Microsoft.SqlServer.Dac.Model.DacQueryScopes

The scope filter for queried objects.

Return Value

Type: System.Collections.Generic.IEnumerable<TSqlObject>

All TSqlObjects that match the objectType and id.

Exception Condition
DacModelException

If the objectType is not a top level type.

ArgumentNullException

If the supplied id is null.

ArgumentNullException

If the supplied objectType is null.

RemotingException

If communication fails during remoting.

Return to top

TSqlModel.GetObjects Method (String, ModelTypeClass[])

public IEnumerable<TSqlObject> GetObjects(
	string sourceName,
	params ModelTypeClass[] typeFilters
)

Parameters

sourceName
Type: System.String

typeFilters
Type: Microsoft.SqlServer.Dac.Model.ModelTypeClass[]

Return to top
Show: