I have several questions regarding the decoupling of my domain level and data level in an MVC3 web application using an entity structure as the data access level.
Since it stands right now, my controllers are completely dependent on the EF classes, and after spending most of the day looking at dependency injection, I try to separate them.
The first question I have is - do I need to efficiently duplicate all EF classes in my business layer? I obviously can't use the EF classes, so it seems to me that I need to duplicate each used table class to make this work. It is right? So, for example, if I have 50 EF classes representing 50 tables in my database, do I need to create 50 new classes at my business level? → and then support them indefinitely? That sounds like a lot of work.
Secondly, can I proceed from the assumption that the dependence is abandoned, and instead of the business layer it depends on the data layer, the data layer becomes dependent on the business layer?
source
share