Share via


AdoDotNetProviderObjectFactory Class

Provides an implementation of the DataProviderObjectFactory class for DDEX Providers whose underlying technology is ADO.NET.

Namespace:  Microsoft.VisualStudio.Data.AdoDotNet
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Declaration
Public Class AdoDotNetProviderObjectFactory _
    Inherits DataProviderObjectFactory
'Usage
Dim instance As AdoDotNetProviderObjectFactory
public class AdoDotNetProviderObjectFactory : DataProviderObjectFactory
public ref class AdoDotNetProviderObjectFactory : public DataProviderObjectFactory
public class AdoDotNetProviderObjectFactory extends DataProviderObjectFactory

Remarks

ADO.NET already provides a number of the features required to support a DDEX Provider, so this class automatically provides certain default implementations for classes if not overridden by a provider.

The following classes are implemented automatically:

In addition to these base classes that that you can create directly using this factory object, the following classes are also implemented:

  • DataObjectEnumerator: ADO.NET has a generic mechanism for enumerating data objects. Two implementations are provided - one to provide "root" information, and another to enumerate collections of data using the GetSchema API.

  • DataSourceInformation: ADO.NET has a generic mechanism for providing data source information. The base class may, however, not always provide complete information.

  • DataCommand: ADO.NET already has a generic mechanism for executing commands.

  • DataParameter: ADO.NET has a generic mechanism for working with parameters; however, it is somewhat limited insofar as it is not aware of back-end-specific parameter types.

  • DataTransaction: ADO.NET has a generic mechanism for beginning and ending transactions.

  • DataReader: All ADO.NET providers have various ways of exposing data. The AdoDotNetDataReader class provides a complete implementation using the ADO.NET IDataReader interface. The AdoDotNetDataTableReader class provides a complete implementation of this interface using the ADO.NET DataTable object. More implementations may be added if needed.

  • DataObjectConceptMapper: ADO.NET exposes a generic set of data types which this class uses to implement data type mappings to the various data type property concepts recognized by DDEX.

  • DataObjectIdentifierConverter: ADO.NET exposes some information that can be used to produce a reasonable base implementation of this class. It may not work correctly in all scenarios.

  • DataObjectItemComparer: ADO.NET exposes some information that can be used to produce a simple implementation of this class. It will only work for basic scenarios.

This class relies on there being a ProviderInvariantName property specified in the registry by the DDEX provider that tells the class what the ADO.NET invariant name of the provider is. This is passed down to the specific objects to ensure that the correct implementations of ADO.NET objects are created.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.ObjectWithSite
    Microsoft.VisualStudio.Data.DataProviderObjectFactory
      Microsoft.VisualStudio.Data.AdoDotNet.AdoDotNetProviderObjectFactory

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

AdoDotNetProviderObjectFactory Members

Microsoft.VisualStudio.Data.AdoDotNet Namespace

DataProviderObjectFactory