I have a problem that causes hair loss ...
I have a project build using Code First (EF); everything is fine, and it works like a charm, however I canβt find a suitable way to allow changes to the database (via .sql scripts) without an application that throws hysteria at startup because the circuit has changed.
I read and read this problem, I deleted the EdmMetaData table so that it could not compare the database hash, but then read that there was an error in EF with this, if it is deleted, it still considers the scheme (since it does not recognize missing table, so it compares an empty row!).
In addition, I tried using Database.SetInitializer (null) in the Global.asax file, but that means I cannot access the data model later.
Everyone is talking about using the option to delete the database when changing the scheme, etc.
This is what I am looking for:
For EF / Code First do ... NOTHING! Sweet FA! Dumbass!
... If I change the circuit through an external application, I want it to completely ignore the changes and just ASSUME. I applied the appropriate model changes to work with these database changes made using the .sql script. If I skip a column or a table, I will accept my stupidity, and I expect tantrums, but until I make a mistake, I want EF to trust me.
This means that I can easily update any of our clients using the .sql script, at any time and not worry that EF will grow !: (
ANY ideas guys ??