locked
Self-Tracking Entities Different assembly from Model and Context and DynamicData RRS feed

  • Question

  • User-1472100329 posted

    Hi,

    I'm using the Self-Tracking Entities codegen option in EF4, and I'm trying to use Dynamic Data to build a quick-and-dirty website for editing. The Entities, Data Context, and EDMX files are all in separate assemblies, and this model works well when I call everything in code. But when I try to use it with Dynamic Data, right off the bat I get a whole lotta FAIL:

    [ArgumentException: Could not find the CLR type for 'MyModel.DashboardNewsMessage'.]
       System.Data.Metadata.Edm.MetadataWorkspace.GetObjectSpaceType(StructuralType edmSpaceType) +2898923
       System.Web.DynamicData.ModelProviders.EFDataModelProvider.GetClrType(EntityType entityType) +20
       System.Web.DynamicData.ModelProviders.EFDataModelProvider.CreateTableProvider(EntitySet entitySet, EntityType entityType) +71
       System.Web.DynamicData.ModelProviders.EFDataModelProvider..ctor(Object contextInstance, Func`1 contextFactory) +815
       System.Web.DynamicData.ModelProviders.SchemaCreator.CreateDataModel(Object contextInstance, Func`1 contextFactory) +126
       System.Web.DynamicData.MetaModel.RegisterContext(Func`1 contextFactory, ContextConfiguration configuration) +378
       EfWebApplication.Global.RegisterRoutes(RouteCollection routes) in D:\projects\testdinamicData\DinamicDataSolution\EfWebApplication\Global.asax.cs:30
       EfWebApplication.Global.Application_Start(Object sender, EventArgs e) in D:\projects\testdinamicData\DinamicDataSolution\EfWebApplication\Global.asax.cs:59

    Can anyone help me?

    thanks in advance

    Friday, November 25, 2011 11:34 AM

All replies