jonpsmith / efschemacompare Goto Github PK
View Code? Open in Web Editor NEWEfSchemaCompare.EF6 allows you to compare Entity Framework's database modal with an actual SQL database.
License: MIT License
EfSchemaCompare.EF6 allows you to compare Entity Framework's database modal with an actual SQL database.
License: MIT License
Hi.
Thank you for EfSchemaCompare.
If I have a database table with two foreign keys which have different cascade delete actions, CompareEfWithDb
will return errors.
This is happening because when the cascade delete actions are checked, the code arbitrarily picks up the mismatched value, specifically for many-to-one and one-to-many relationships.
See
I've found that when a DbContext has mappings to a class in the same assembly, which is a nested class, then the comparer thinks the type is defined in another assembly.
Making the classes not nested is the obvious solution, but that would be... not easy.
Hi,
I ran into minor bug in EfCore.SchemaCompare
5.1.4 version (latest).
Setting default schema in DbContext
to same value as default database schema (most likely dbo
) results in incorrect comparison. This then most probably results in errors like NOT IN DATABASE: Entity 'Author', table name. Expected = dbo.Authors
Reproducing it is easy. Add modelBuilder.HasDefaultSchema("dbo");
to BookContext
and most unit tests will fail.
The main issue is in methods that generates table names:
FormSchemaTableFromModel
- generates dbo.Author
because we had explicitly specified dbo
schemaFormSchemaTableFromDatabase
- generates Author
because table.Schema == defaultSchema
Hi @JonPSmith
I have the following TypeLoadException
since I don't have resharper to run the unit tests, can you fix it?
I already tried as follow
but then it complains that the column is missing.
Not sure why
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.