Creating a Custom LINQ Entity Base Class
In this final part of this chapter, we build a custom LINQ to SQL base class. Our base class contains standard methods for selecting records, inserting records, updating records, and deleting records. It also supports paging and caching. Finally, our base class contains methods for performing validation.
The files for the custom classes can be found on the website that accompanies this book in the folder EntityBaseClasses. This folder contains the following files:
• EntityBase— A custom base class for LINQ to SQL entities.
• EntityDataSource— A custom data source control derived from the ObjectDataSource control for representing LINQ to SQL entities.
• EntityValidator— A custom validation control.
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.