I read a few posts that discuss how to use EF objects as business objects.
Using Entity Framework objects as business objects?
but does a business object project make it data model dependent? Is this good practice for enterprise applications? should the domain and data model be independent, and changes in it should not affect another? if I decided to save them separately, then I need to create another layer to populate business objects from EF objects? if I have both custom business objects and EF objects that are used to transfer data between layers (including the entire path to the user interface)? is there any architectural model for this? It would be useful if there was an example application that demonstrates these concepts (and not just a demo version suitable for use in a corporate application).
This link clearly explains the problem.
http://msdn.microsoft.com/en-us/magazine/dd882510.aspx#id0420099
It depends on how weakly connected / you want to be.
Take, for example, the WPF / MVVM application that negotiates with the Service through WCF and stores data using EF. Then, if you go all the way, you have the following:
On the client:
Between client and server:
On server:
With a display code between each layer. It can be a lot of work and duplication between objects. Perhaps this is not too practical. We are trying to combine them where possible, for example, can a DTO be a model?
, EF, , . , -.
DTO :
, , ...
, DTO/POCO (Plain Old CLR Obects), EF DTO . Rolls-Royce ... , - ORM . , ( ) , , , , , .
, DTO/POCO / - , , . Enterprise application , , , - ORM ( EF).
, , EF ".designer.cs" .
, , , , -. , EF ( ORM) ...
this .