Creating Data Repository Classes on a different machine

Oct 15, 2008 at 10:57 AM
I am currently using the repository factory to build my application, but have been forced to rebuild my machine and now I when I go to add new Data Repository classes it does not pull the existing ones up and therefore ends up overwritting them.

Is there anything I can do?

Thanks in advance
Oct 16, 2008 at 1:46 AM
Hi Davie,

I am not sure if I got your question right, but if you moved your solution to another machine make sure to also copy the gpstate and rcpstate files located at your solution directory. The gpstate file will contain the guidance packages that are enabled in your solution file, in our case the Repository Factory. The rcpstate file will contain the mappings you used for repository classes and stored procedures, and entities properties and stored procedure parameters. This will allow you to use the same mapping you used before. If the rcpstate file is missing, then it will use the default mapping.

Also, if you rerun the "create repository classes" it will always regenerate that source code again. You should not make manual changes to the generated source code. You should instead use create partial methods to extend the functionality and keep them on a separated file, so that it will not be overwritten when you run "create repository classes" again.