Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Throughout this book you’ve seen us attempt to organize and
refactor code as our application grew. From the beginning, we’ve kept
the domain classes in their own project. If you have read
Programming
Entity Framework: Code First, you saw that when we
used the Fluent API to configure our entities, we created separate
classes to contain the Fluent configuration logic for each type. In the
validation chapters, you saw that we encapsulated logic from the
ValidateEntity method so that the
method wouldn’t get loaded down with details of each custom validation
being performed. Organizing logic in this way makes it easier to reuse
that logic and lets us share classes and logic across our multiple
contexts.