Some remarks before the answer:
The Entity Framework is already an ORM. You do not need to create a project to envelop this;
You do not need to separate the domain from the ORM layer. The correct is the context and the entities stay in the same project;
You are putting an unnecessary level of complexity in your project. A Model is not a DTO because it is not anemic. As I see it, you're experiencing in the same errors as this question here ;
In DataTransferObjects
(which, by good practices, should be discarded from your solution), the correct thing would be to group your entities by namespace through a directory.
Let's answer:
Is it necessary for each project that references EF to have its own files app.config
and package.config
?
Yes, it is. I explain:
app.config
indicates to the Entity Framework which data providers will be used. If there is a context in the layer, and the layer works independently of the Web project, configuration is required.
To prove this, try running a migration using your isolated domain layer as your initial project.
package.config
tells NuGet what you are using from external dependency in your Class Library . Each component of the solution has its own packages.config
. An example of this is that you will not use Web dependencies in a Class Library domain, and will not use EF in a Web project that has no descriptive data access.