DbConfiguration.SetTableExistenceChecker Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Call this method from the constructor of a class derived from DbConfiguration to register a database table existence checker for a given provider.
protected internal void SetTableExistenceChecker (string providerInvariantName, System.Data.Entity.Infrastructure.TableExistenceChecker tableExistenceChecker);
member this.SetTableExistenceChecker : string * System.Data.Entity.Infrastructure.TableExistenceChecker -> unit
Parameters
- providerInvariantName
- String
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this provider will be used.
- tableExistenceChecker
- TableExistenceChecker
The table existence checker to use.
Remarks
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.
Applies to
Entity Framework