Pages

Monday, November 10, 2008

LINQ to SQL - Implementing the Repository pattern

I've been playing with LINQ to SQL for the past month. It really impresses me with its ease of use.

But I am getting some strange errors where EntitySets don't want to populate no matter what. I can do whatever I like with the relationships and the loading options, it does not want to work. It appears to be objects which wrap views in the database.

Then I read something about how tightly coupled objects can be bad in that they make unit testing a nightmare by complicating the data access layer.

So, I thought of using LINQ to SQL in a loosely coupled fashion. It will still increase the speed at which I develop my data access layer. And then I found someone who had a similar idea. Here it is: LINQ to SQL - Implementing the Repository pattern

No comments: