DAL using Entity Framework VS Custom entities
Often I have seen questions over the need of Entity Framework based Data Access Layer (DAL) against Custom entities based DAL.
Here are my thoughts,
Entity Framework has significant edge over custom DAL (with custom entity) on following dimensions,
1) Entity Framework Provides O-R capability
2) Supports OoB relationship navigations. You can navigate from Customer to Orders and back without any programming overhead.
3) Supports OoB eager/late loading of objects. Can be done for any number of Navigational objects thus providing benefits of fetching data in batch as against multiple database round trips.
4) Supports multiple databases/stores through respective providers
5) Supports object modeling capability through UI designer
6) Supports OoB change tracking for Objects
7) Provides custom patterns for Thick/Smart, thin, Service oriented apps. Patterns are Entity object based, POCO and Self Tracking Entities based.
8) Provides flexibility to replace any other OR modeler with Entity Framework if used with POCO pattern.
9) Has emerged as a uniform framework from Microsoft for designing DAL and interacting with Database.
10) Best suited for Enterprise wide DAL implementation for apps connecting to multiple disparate data stores.
However the custom entities approach would only have strengths in #8, with slightly lighter object model that comes at the cost of manually supporting other aspects.