Skip to content
Extensions library for Microsoft Entity Framework 4.2
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Solution Items

EntityFramework.SchemaCompare v0.0.1-alpha

An alternative to EntityFramework.Migrations. It allows to compare database schema with EF Code-First entities model during database initialization or manually on request. Then having all the differences / incompatibility issues between the model and db schema on hands you can update either database schema or code-first classes to get them back in sync.

The latest version is at

How to use it?

Database.SetInitializer(new CheckCompatibilityWithModel<DatabaseContext>());


Database.SetInitializer(new CheckCompatibilityWithModel<DatabaseContext> { CreateDatabaseIfNotExists = false });

This will run database schema and model comparison during database initialization. If any compatibility issues found it will throw an exception describing the differences between db schema and model.

Alternatively you can call

using (var db = new DatabaseContext())
    var issues = db.Database.FindCompatibilityIssues();
} find all the differences between db schema and entities model.


EntityFramework.SchemaCompare is Open Source, released under the terms of the Apache License 2.0; see the file.

Something went wrong with that request. Please try again.