Extension points in Linq-to-Sql
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 exten开发者_Go百科sion 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:
- own partial DataContext class
- partial methods
- LINQ to SQL templates for T4
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.
Yes, there are partial methods available as well.
精彩评论