tags:

views:

36

answers:

2

Are there more extension points available in linq-to-sql than creating your own partial DataContext class and extension methods?

Update: To be more specific: I want to collect the extension points that are available in Linq-to-Sql, because I thought it would be interesting to know were you are able to step into the codegeration.

At the moment I got:

A: 

Yes, there are partial methods available as well.

Randy Minder
A: 

In what sense? If you mean lower-level constructs where you can abstract away the database, I believe the answer to that is "no", and you'd have to use the Entity Framework to write a Provider to do so.

If you mean on the classes themselves, you can implement partial methods on the DataContext AND your model classes, which is really powerful, in addition to extending the classes any way you want simply by adding new methods.

Dave Markle
I was just curious how to get the most out of linq to sql. I thought about T4 Templates, "hidden" config setting, providers, interfaces...
Yots
IMO you shouldn't be too curious about really extending Linq to SQL. If you're being forward-looking, concentrate your efforts on the Entity Framework.
Dave Markle