Last post Feb 01, 2011 10:19 PM by johnfoot
Feb 01, 2011 12:01 PM|johnfoot|LINK
I am using the ADO.NET Entity Framework for loading data from the database. The classes are directly mapped to database tables in the database. The problem is that these classes are not optimal for binding to the UI elements. As a result of this I have
some custom entities which are populated at the service layer and returned. It is these custom entities (classes) to which I bind the UI elements. My questions on this are
1. Is populating these entities at the service layer the most appropriate way to do this. I personally do not think so because if we introduce some additional UI elements which need different entities then I have to modify the service layer again.
2. What is the best approach/pattern to get this done.
Feb 01, 2011 12:25 PM|shabirhakim1|LINK
Here John Papa demonstrated how the Entity Framework can integrate into an architecture, use modern patterns such as the MVP pattern, and handle the common architectural concerns. Key components of the Entity Framework in layered architectures are
its change tracking mechanisms.
I suggest you to read this beautiful column
July 2008 Data Points column
Feb 01, 2011 10:19 PM|johnfoot|LINK
The link does not answer my question. It is just details on the Entity Framework which is not what I am looking for. What I am looking for is a way (good practice) to transform entity framework classes to other objects which can then be bound to UI elements.