Home  /  Questions  /  Question

275   99.7
Jul 14, 2010

Accessing Entity Framework

Hi all, I am doing a project (Win Forms Application) in .NET 4.0.
For Data Access I am using Entity Framework.
To query the objects do I need a wrapper class like Business Layer or can I directly use the entities in the UI?
Just in general, when do I use the Business Lyer. Anyhow, I am a bit confused as my previous experience is with 3-tier architectures and I am feeling that with Entity Framework this is difficult to achieve.

Jul 14, 2010
I always try to use the 3-tier principles.
Some times that is not neccessary but generally speaking this approach is very usefull if someone other programmer wants to work in your project or to follow the principles of project's scalability.
Try to separate the BL of DL by using Interfaces
 1 comment
Thanks Grigorious... Can you send me some sample code of 3-tier with Entity Framework... Hope you don't mind. --- Imran Khan  Jul 14, 2010

1,128   99.9
Jul 14, 2010
Hi Imran,

Perhaps the following articles and projects can help you in how others use EF4 in N-Tier applications.
Disclaimer: I am not a user of EF4, so I can not say if they are good examples, but they should get you going.
 1 comment
Thanks Robert --- Imran Khan  Jul 14, 2010