DbConfiguration.SetTableExistenceChecker Method (String, TableExistenceChecker)

 

Call this method from the constructor of a class derived from DbConfiguration to register a database table existence checker for a given provider.

Namespace:   System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

protected internal void SetTableExistenceChecker(
	string providerInvariantName,
	TableExistenceChecker tableExistenceChecker
)

Parameters

providerInvariantName
Type: System.String

The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this provider will be used.

tableExistenceChecker
Type: System.Data.Entity.Infrastructure.TableExistenceChecker

The table existence checker to use.

This method is provided as a convenient and discoverable way to add configuration to the Entity Framework. Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for DbProviderServices and also using AddDefaultResolver to add the provider as a default resolver. This means that, if desired, the same functionality can be achieved using a custom resolver or a resolver backed by an Inversion-of-Control container.