I am developing web forms app in C# Framework 3.5
I want to build something like “Presentation > BLL > DAL > Entity Model” flow in my application. But problem is this that, how will I use entity objects in Presentation layer?
Suggestions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you using Entity Framework?
If so, use the POCO Generator instead of the default EntityObject’s.
While the POCO’s are generated from the database model, they are effectively loosely-coupled because you can change the implementation of your DAL while retaining the previously generated POCO’s as your domain model.
I’d suggest moving the POCO’s (and the associated T4 Template that the POCO generator creates) into different project that is referenced by the Presentation Layer, BLL and DAL.
EDIT:
The alternative (if the POCO generator isn’t working in 3.5) is to manually create domain classes and use those in the interface to the DAL. It increases the effort, but I recommend NOT exposing EntityObjects outside of the DAL.