Library for extracting the schema from a database.
DatabaseSchema is available via NuGet:
Install-Package DatabaseSchema
Here is a simple bit of code showing how to create and use an instance of the IDbSchemaReader
.
using(var connection = new OleDbConnection("Data Source=MyDatabase.mdb;Provider=Microsoft.Jet.OLEDB.4.0;"))
{
var schemaReader = new OleDbSchemaReader(connection);
var schemas = schemaReader.GetSchemas();
var schema = schemaReader.GetSchema("MyTable");
// ...
}