System.Data.EntitySqlException

System.Data.EntitySqlException: ‘ExceptionRecord’ could not be resolved
in the current scope or context.

This seemingly small Exception took a while to figure out. I was
calling the ObjectContext constructor without specifying the default
container name. Adding that solved the problem and now the Entity
Framework is happily talking to SQL Server Compact again.

For anyone else looking for a solution to this, here’s the stack trace
you might see:

System.Data.EntitySqlException: ‘ExceptionRecord’ could not be resolved
in the current scope or context. Make sure that all referenced variables
are in scope, that required schemas are loaded, and that namespaces are
referenced correctly., near escaped identifier.