LINQ To SQL generates code that is not CLS compliant

When adding inheritance relations between classes in the O/R designer, the acess level on the generated backing store member of the Id attribute, "_Id", is changed from private to protected, causing the CLS rule violation. The Id property is used in an association between the classes.

If you want to get rid of the warnings, you can use:

#pragma warning disable 3021

Add the following to AssemblyInfo.vb

<Assembly: CLSCompliant(false)>

Or, if you want to disable them project-wide, add 3021 to the "Suppress warnings" field in the Build tab of your project's properties in Visual Studio.