In LINQ to SQL, Can we inherit our entity classes from some other class or interface. I have some common work for all my entities, which I want to code at some common place and call it once.
Regards Parminder
@Jason's answer is useful for manually tweaking each class. To modify all generated classes to use the same base class there is an attribute in the .dbml file that can be edited manually (no UI for it in VS2008).
Add a EntityBase xml attribute into the <Database> xml element, its value is the full name of the base class.
<Database ... EntityBase="MyNamespace.MyBaseClass" ...>
...
</Database>
Its used by the LINQ to Entity Base project.