After generation of DataContext class from my DB I've got CMCoreDataClassesDataContext class.
For unit-testing purpose I would like this class to be implementing my special interface, ICMCoreDataClassesDataContext. I could change designer.cs class but it will need to be updated each time when regenerated.
Is there any solution that allows to mark auto-generated class as to be inherited from my interface? I see possibility to change base class, but how can I specify 'base' interface?
P.S. Is it an option to create a base class that will be inherited from System.Data.Linq.DataContext AND my interface (ICMCoreDataClassesDataContext) and specify it as a base class for autogenerated one? It doesn't work due to necessity to declare required methods as abstract in base class (that is OK) and mark them with "override" in generated.
P.S. .NET 3.5, Linq2sql