我被困在主题 -修改 EntityDataSource 控件标记以提高性能。当我ContextTypeName通过删除ConnectionStringand设置属性时DefaultContainerName,我收到一条错误消息;
Unable to cast object of type 'ContosoUniversity.DAL.SchoolEntities' to type 'System.Data.Objects.ObjectContext'.
请注意:使用ConnectionStringandDefaultContainerName可以正常工作。