基本上我想使用一個動態數據網站來維護EF4模型中的實體在自己的程序集中的數據。模型和上下文在另一個程序集中。實體框架4獨立程序集中的POCO實體,動態數據網站?
我嘗試這樣Entity Framework 4 + Self-Tracking Entities + ASP.NET Dynamic Data = Error
但是從反射得到一個「不明確的匹配」錯誤:
System.Reflection.AmbiguousMatchException是由用戶代碼 消息未處理=歧義找到匹配。 源= mscorlib程序 堆棧跟蹤: 在System.RuntimeType.GetPropertyImpl(字符串名稱,的BindingFlags bindingAttr,粘結劑粘結劑類型返回類型,類型[]類型,ParameterModifier []改性劑) 在System.Type.GetProperty(字符串名稱) 在System.Web.DynamicData.ModelProviders.EFTableProvider..ctor(EFDataModelProvider dataModel,EntitySet entitySet,EntityType entityType,Type entityClrType,Type parentEntityClrType,Type rootEntityClrType,String name) at System.Web.DynamicData.ModelProviders.EFDataModelProvider.CreateTableProvider(EntitySet entitySet ,EntityType entityType) at System.Web.DynamicData.ModelProviders.EFDataModelProvider..ctor(Object contextInstance,Func 1 contextFactory) at System.Web.DynamicData.ModelProviders.SchemaCreator.CreateDataModel(Object contextInstance, Func
1 contextFactory) at System.Web.DynamicData .MetaModel.RegisterContext(Func`1 contextFactory,ContextConfiguration配置) 位於C:\ dev \ Puffin \ Puffin.Prototype.Web \ Global.asax.cs中的WebApplication1.Global.RegisterRoutes(RouteCollection routes):line 42 at WebApplication1。 C:\ dev \ Puffin \ Puffin.Prototype.Web \ Global.asax.cs中的Global.Application_Start(Object sender,EventArgs e):line 78 InnerException: