-2

How to work with Entity Framework in a multiple developers environment using SVN? I mean, everytime I do a change on my machine, all developers have to update their code. They should stop what they are doing and compile the application. If someone changes a table, it´s a mess, because everyone needs to stop what is doing to recompile, and this is not productive. I think that should be a better way to work with Entity Framework and SVN. Thanks!

Rodrigo Souza
  • 147
  • 1
  • 1
  • 10
  • they should not have to do this every time you change your code. if they dont need it to keep working there is no reason to pull latest every time someone checks in. generally i will only just before i start working on something, if needing something someone just added. you dont need to say 100% up to date all the time. just my opinion – workabyte May 29 '14 at 14:42
  • This is not a .NET question, you and your team should learn how to work with version control. – shay__ May 29 '14 at 14:49
  • @workabyte The only area I've really seen this come into play is removing columns. If other people are trying to test their outdated EF model (that still looks for that column) they will get runtime errors. It does not have anything to do with SVN though. – Nate May 29 '14 at 14:58
  • I agree that this has nothing to do with SVN and this is not a .NET question. I'll try to improve our knowledge about version control and entity framework as well. Thanks to all. – Rodrigo Souza May 29 '14 at 15:03
  • "I mean, everytime I do a change on my machine, all developers have to update their code" -- binary tables... yes, if someone is working on the table too, then that is a problem no matter what. But regardless, a developer needs to get and build the latest before committing to the trunk anyway, so not sure how this is any different. If you want to not deal with binary files, build the tables from text files as part of the build process. – crashmstr May 29 '14 at 15:06
  • I found this http://stackoverflow.com/questions/1434554/entity-framework-merge-nightmare and looks good. – Rodrigo Souza May 29 '14 at 15:07

1 Answers1

0

They will only have to update their code if the entities they are using are affected by the change. Note that this problem isn't specific to EF. Do a plain SQL query on a table that's been changed to have different column names, you run into the same problems.

Some things I would look into doing...

  1. Control who is making changes to the database/model and when it happens
  2. Split your EDMX into logical diagrams instead of a huge one with everything in it
  3. Create database projects to house the SQL files and put them into SVN
  4. Duplicate test environment databases and sync them every so often.
jamesSampica
  • 12,230
  • 3
  • 63
  • 85