On EF4 actions on entities are actually done via the Business Element layer (BE).
Why do I need the Data Access (DAL) on another layer?
|
On EF4 actions on entities are actually done via the Business Element layer (BE). Why do I need the Data Access (DAL) on another layer? |
|||
|
|
|
It's usefull to wrap entity functions with a service/ DAL layer. You'll also find you will probably use the same data operation repeately throughout your application, so if you have it wrapped in a service class, it's easy to reuse. My own rule of thumb is, if you have a entity manager in a backing bean, then your doing it wrong. |
|||||||
|
|
It's still good idea to have a separate DAL. In the future, you might want to implement something else (other than Entity Framework). Will you go on looking for all the data access code lying all over the place? nah, I don't think so. |
|||
|
|