c# - Is there an easy way to verify whether or not the database schema is exactly what I expect it to be using Entity Framework? -
I want to validate my application's database consitency at startup time.
Is there an easy way to verify whether the database schema is the one which I hope is using this anti framework?
There is some verification in EF4 if there is a column in a mapped type that does not exist in the target table, when EF4 is physical, it triggers exception. Although there are some things that do not do this: it does not verify the entire database earlier, it does not trigger an exception when there is a column in the target table that does not map.
Is there an easy way I can accomplish?
For your specific example, EF can not know that you do not tell it about schema if If there is an area that has not been mapped, then the SQL statement (especially inclusion) is successful against the table EF, actually does not care that the area may have been disliked, but it has some inheritance Should be kept for the app or Because it is a pain and a half to remove the active DB field.
Comments
Post a Comment