Take the 2-minute tour ×

I am using Entity Framework 5.0 with Entity Framework Powertools beta 2. We have a database that we are not allowed to change and so are using the Reverse Engineer Code First option to create the classes. The generated classes are placed in the Models folder below the mappings.

Is there a safe/best way to move these generated classes into their own project, leaving the DbContext-type class and the Mapping file classes in the Models folder?

share|improve this question
This sounds like a question about moving classes between projects/namespaces. You can do that manually or with a tool like ReSharper –  Kieren Johnstone Oct 10 '12 at 11:27

1 Answer 1

up vote 1 down vote accepted

There is no problem with moving the entities to whatever project and/or namespace you like. Just copy the files to where you want them. You will, however, likely want to go in and change the namespaces on every file (though it's not specifically required).

You do of course have to add a reference to your new assembly to your parent project.

share|improve this answer
Thanks Mystere Man. I was hoping it would be that simple! –  Anita Oct 10 '12 at 22:24

Your Answer


