datacontext name is not specified in the .dbml

Jan 6, 2010 at 8:05 PM

If I change the name of the data contract in the .dbml file's properties, I get an error that says "datacontext name is not specified in the .dbml" when I try to generate code. Am I doing something wrong?

Coordinator
Jan 25, 2010 at 12:28 PM

The code generator in T4 Toolbox reports this error when <Database/> element does not specify value for Class attribute in the .dbml file. This attribute corresponds to the Name property of DataContext in Properties window. Normally, the designer forces you to have this value assigned. I don't know of a way to make this property value empty without using XML editor. Please post additional details if you are still having this issue.

Oleg