We have a team of 4 (and growing) so source control is very important to us. Only two of us change the data access layer (DAL).
We use subversion and the latest beta of the PushOK subversion proxy (www.pushok.com) which seems quite stable now and has the advantage of using the integrated visual studio source control features (unlike Ankh).
We store our lgp file in source control and also store our generated code in source control. While you could decide not to store the generated DAL code in source control and so regenerate it as needed, everyone needs the DAL code and we don't want everyone having to regenerate individually. Of course you could also generate the DAL dll once and then distribute that to all of your team - but then you'd be putting the .dll into source control - which is ok. But for us, it worked better to just checkin the DAL generated code into source control and then everyone gets a copy in the solution. This means too that we have a clear snapshot of the generated code at any point in time.
We structure the DAL as follows:
- we have one project that contains the .lgp file
- we have one project with the db generic generated code
- we have one project with the db specific generated code
How we modify the DAL is:
- check out the lgp
- check out the db generic generated code project (this checks out all source files within this project)
- check out the db specific generated code project (this checks out all source files within this project)
- double click on the lgp file to open it in the llblgen pro gui
- make the necessary changes
- generate the code - this will overwrite the existing source files
- save the lgp project
- compile your code - ensures that everything generated fine and your code works with the newly generated code
- check in the lgp and the two generated code projects
This process didn't work this easily prior to Frans implementing project updating. We used to have to remove the projects from the solution and add the newly generated ones back again which was a pain. Now that the project files are updated, everything works smoothly.
The only drawback with this is that if you change the DAL code, when another developer does a source update, the update can be slow since there are a lot of files updated (it will be every source file in the DAL since every file is changed - if only to update the "generated on" comment at the top of the source file). But we don't currently find this a big issue at all as it only happens when the DAL is updated and that is infrequent. I would assert that once you get your database stable, it won't change much. If you have a very large DAL, the update time could potentially be a problem but you'd have to make a judgement call (and you can always separate your DAL out into another solution).