How to use entity framework in business layer and/or data layer?
asp.net, c#, entity-framework
Solution
EntityFramework should go in the Data Access Layer. To expose it up to the presentation layer tightly couples your presentation to the database, allowing changes at the database level to flow up to the presentation layer.
What we have done on some of our projects is to use entity framework at the DAL, transform the entities to our business objects (which are actually quite simple object primarily used as DTO's as most of our logic is contained in services that act on the objects - this route isn't for everyone, but it fitted with what that architecht wanted).
Problem
I would like to use entity framework in my asp.net application. I can use Linq to entities in any layer, but I would like to know where should I put Entity Framework? (DAL, BAL or direct use in Presentation).