I'm working on a very large non-MVC project utilizing Entity Framework for database access. This is a new project, so we've got a wide-open canvas for development.
The conceptual problem I'm running into is how to model the layer just above the EF Models.
At the database level I've got a
Item table so there's a model for each.
Now I need to describe what the Customer can do. For example, ultimately I want to say something like:
Order newOrder = customerObject.CreateOrder(itemList);
Where does the method CreateOrder live?
My gut tells me that there's a sub-class of the
Customer Model that has the methods needed by the Customer. With an interface to that class up front to keep the cross-dependencies between modules low.
But this sounds too easy to be the correct way.
Some related questions I've found, but didn't exactly apply are: