With DB first, I created EDMX and committed (initial) to GIT. I am the only one who worked on that module, and model holds only one table (more to come in future). My colleague pulled this and build succeeded. He didn't test my module post integration however.
Today I deleted one of the table columns, updated EDMX from database, and everything worked fine at my end. Committed this change to GIT, however, when colleague pulled this commit, it seemed that his EDMX was still referring to the missing column and his code broke on SaveChanges call, stating the column did not exist (in db). We both use central MSSQL database and EF 6.1.x, just FYI.
For now we updated his repository by updating EDMX again from database and things moved on. However, we are not just two in the team, and I need to find the root cause/ better workaround so that others do not face this when they pull and run my module.
When he updated his EDMX copy, GIT showed available commit with the following changes in edmx.designer.cs file.
- // T4 code generation is enabled for model '<my_local_path>\<project_dir>\<name>.edmx'.
+ // T4 code generation is enabled for model '<his_local_path>\<project_dir>\<name>.edmx'.