Dec 06, 2017 07:27 PM|wavemaster|LINK
I have added a single column called "PayAmount" to an existing table (Transactions) with datatype money Allow Nulls to my local and remote dbs.
Everything the same.
On the local machine in the EF diagram I selected "Update Model from Database".
Saved the changes and did a Build
That was all OK.
Published the changes to these EF related files to Azure.
Locally everything works as intended but on the remote I am getting a complaint about invalid column name
Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'PayAmount'.
Line 42: var records = (from t in theProvider.Transactions
Line 43: where t.ProviderId == providerid
Line 44: && t.ClientId == clientid
I have verified the new column is indeed in the live db.
Looking for suggestions as to what can cause this. That is my first question.
My second question is related to my normal solution in this case. I would typically wipe the entire EF Model, and start from scratch. It is a very time consuming solution as there are many custom Navigation Properties and I always seem to mess up the name
of the model so I have to go through the code and fix things. Done this now probably 8 - 10 times and really hate it.
I easily loose half a day. Is there a better way to recover from these EF issues?