Alex Rivera | Logout

Using Entity Framework as Data Access Layer

Asked 2009-05-27T13:34:17.100
13

In my ASP.NET application I want to implement by data acess layer using the Entity framweok so I can use it as an ORM tool. But I dont want the rest of the application to care that I'm using this or be polluted by anything entity frameowrk specific.

I cant seem to find anyone who is using the entity framework exclusively in their Data access layer so I'm keen to see any online examples of this/ experience people have.

Edit
Report

2 Answers

4

You could abstract the entity framework using something like the repository pattern like ScottGu does with Linq in the NerdDinner series.

http://nerddinnerbook.s3.amazonaws.com/Part3.htm

answered 2009-05-27T13:38:33.643
3

http://blog.keithpatton.com/2009/05/30/Entity+Framework+POCO+Repository+Using+Visual+Studio+2010+Net+40+Beta+1.aspx

this is DDD inspired architecture i've just worked up with EF v4 which uses Unity IoC to inject an EF repository, hope that helps

answered 2009-05-31T01:12:54.313

Your Answer