我正在尝试将动态数据与具有由子实体派生的抽象类的实体模型一起使用。
每当我运行网站时,我都会收到此错误:
model.RegisterContext(typeof(QMSModel.QMSEntities), new ContextConfiguration() { ScaffoldAllTables = false });[KeyNotFoundException: 给定的键不在字典中。] System.ThrowHelper.ThrowKeyNotFoundException() +28 System.Collections.Generic .Dictionary 2.get_Item(TKey key) +7452124 System.Web.DynamicData.ModelProviders.EFAssociationProvider..ctor(EFColumnProvider column, NavigationProperty navigationProperty) +336 System.Web.DynamicData.ModelProviders.EFColumnProvider.get_Association() +82 System.Web.DynamicData.MetaColumn.Create(MetaTable table, ColumnProvider columnProvider) +16 System.Web.DynamicData.MetaTable..ctor(MetaModel metaModel, TableProvider tableProvider, Boolean scaffoldAllTables, String nameOverride) +272 System.Web.DynamicData.MetaModel.RegisterContext(DataModelProvider dataModelProvider, ContextConfiguration configuration) +758 System.Web.DynamicData.MetaModel.RegisterContext(Func
1 contextFactory, ContextConfiguration 配置) +359 System.Web.DynamicData.MetaModel.RegisterContext(Type contextType, ContextConfiguration 配置) +79 ASP.global_asax.RegisterRoutes(RouteCollection routes) in c:\Projects\DynamicDataWebsite\AdventureWebSite\Global.asax :19 ASP.global_asax.Application_Start(Object sender, EventArgs e) 在 c:\Projects\DynamicDataWebsite\AdventureWebSite\Global.asax:49
有人有想法吗?