public void CompareSchema() { var superSetConnectionString = ConfigurationManager.ConnectionStrings["Persistence"].ConnectionString; var subSetConnectionString = ConfigurationManager.ConnectionStrings["PersistenceEF"].ConnectionString; SqlServerSchema.Remove(subSetConnectionString); var configuration = new EntityFrameworkDbContextConfiguration <CompareContext>(connectionStringOrName => new CompareContext(connectionStringOrName)); configuration.ConnectionString(subSetConnectionString); configuration.CreateSchema(); SqlServerSchema.AssertContained(new ConsoleLogger(), superSetConnectionString, subSetConnectionString, false, "__MigrationHistory"); }
public void CompareSchema() { var superSetConnectionString = ConfigurationManager.ConnectionStrings["Persistence"].ConnectionString; var subSetConnectionString = ConfigurationManager.ConnectionStrings["PersistenceEF"].ConnectionString; SqlServerSchema.Remove(subSetConnectionString); var configuration = new EntityFrameworkConfiguration(); configuration.ConnectionString(subSetConnectionString); configuration.ProviderName(EntityFrameworkConfiguration.SqlServerProviderName); configuration.RegisterEntitiesFromAssemblyOf <FooConfiguration>(); configuration.CreateSchema(); SqlServerSchema.AssertContained(new ConsoleLogger(), superSetConnectionString, subSetConnectionString, false, "EdmMetadata"); }