If I add or change a field in my database, how to I update my .edmx file? Do I run “update model from database” and Do I need to delete the .tt files and run a new “Add code generation item?”
Do I need to make any other changes to my MVC project files for it to be up to date with
the database changes?
Lots of questions!
Yes you can run update model – sometimes (if you rename a field) you will have to amend the model by hand – removing the old field OR you can delete the whole entity before you hit update model.
You don’t need to delete the .tt files and run the add code generation bit.
You may need to right click on the .tt and choose “Run custom tool” to tell the .tt file to regenerate your model classes.