views:

59

answers:

1

In the NerdDinner example they use a repository pattern to decouple the business from the data layer. But then they use the Linq to SQL generated classes (Dinner specifically) as the entity class used throughout the project. So how decoupled is that really? It’s not like you could easily exchange Linq-to-SQL.

On my last project I created a separate entity class that I populated with left/right in the linq query because I found that even if you use a partial of the linq generated you cannot populate any additional fields that you add at query time.

A: 

LINQ to SQL is strongly tied to the database schema, which is why I wouldn't use it. I'd use Entity Framework instead, as it permits a mapping between the conceptual and logical models.

John Saunders