Export (0) Print
Expand All

DatabaseSchemaProvider Class

Visual Studio 2010

Provides a base class for a suite of factory objects and factory methods. These objects and methods are used to instantiate service objects that are related to schema and script modeling that, together, represent the core object of database projects in Visual Studio.

Namespace:  Microsoft.Data.Schema
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

public abstract class DatabaseSchemaProvider : IExtension

The DatabaseSchemaProvider type exposes the following members.

  NameDescription
Protected methodDatabaseSchemaProviderInitializes a new instance of the DatabaseSchemaProvider class by using the provided constructor types.
Top

  NameDescription
Public propertyExtensionManagerGets the ExtensionManager for the current database project in Visual Studio Team System 2008 Database Edition.
Public propertyFamilyNameGets the name of a group of providers. For example, the family name of the SQL Server family of database providers is "sql".
Public propertyModelSchemaGets the ModelSchema object for this provider.
Public propertyUserInteractionServicesWhen implemented in a derived class, gets the UserInteractionServices object for this provider.
Top

  NameDescription
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberGetCompatibleDatabaseSchemaProviderTypeReturns the Type that represents the type of provider that is appropriate for the version of the database pointed to by the provided connection string, and for the provided family name.
Public methodStatic memberGetCompatibleDatabaseSchemaProviderTypesReturns a list of provider types that are compatible with this provider.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetSchemaUpgradeXsltWhen implemented in a derived class, returns XSLT to convert a schema model of the provided version to match the current schema model.
Public methodGetService<TService>Returns an instantiated service object that is registered with this provider and identified by the provided Type.
Public methodGetServiceConstructor<TServiceConstructor>Returns a constructor for the service that is identified by the provided Type.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodRegisterModelTypesWhen implemented in a derived class, registers the model types that are found in the provided model schema.
Public methodSchemaVersionSupportedReturns a value that indicates whether the provided version is the same as that of the schema model, or whether an XLST is available to convert the schema model to the provided version.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

Use this base class to create a concrete implementation for a specific database product such as SQL Server, which is represented by the SqlDatabaseSchemaProvider class. SqlDatabaseSchemaProvider serves as the base class for each of several database schema providers (DSPs) for specific versions of SQL Server, such as Sql100DatabaseSchemaProvider and Sql90DatabaseSchemaProvider.

Concrete implementations of the DatabaseSchemaProvider class for the various database products expose these services:

  • Parse a script file into a script model.

  • Interpret a script model into a schema model.

  • Generate a script model from a schema model.

  • Generate a script file from a script model.

In addition to these high-level abilities, more detailed services are exposed, such as comparison services and user interface (UI) help for display names, icons, or other UI objects. These detailed services are provided by the DataProviderServices class.

DatabaseSchemaProvider implementations also enable application features to declare compatibility with various DSPs. For example, if a feature declares compatibility with DatabaseSchemaProvider, that feature is designed to work with abstract interfaces such as IDatabaseTable and IDatabaseColumn. If a feature declares compatibility with a concrete implementation such as Sql100DatabaseSchemaProvider, it is designed to work with abstract interfaces such as ISql100Table. That feature can be loaded only if the project is also of the declared compatible provider type. This gives the feature safe access to functionality that is specific to the concrete implementation.

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

Community Additions

ADD
Show:
© 2015 Microsoft