Start a new topic

Moved EDMX to sub-directory in separate assembly

 The non-Vista connection string looks like this for meta-data


In VistaDB, I have a file named Forms.Forms.ssdl in the folder with the .vdb5 file.

When trying to execute a query, I get the following exception:

The entity type def_AttachType is not part of the model for the current context.
   at System.Data.Entity.Internal.InternalContext.UpdateEntitySetMappingsForType(Type entityType)
   at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
   at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
   at System.Data.Entity.Internal.Linq.InternalSet`1.AsNoTracking()
   at System.Data.Entity.Infrastructure.DbQuery`1.AsNoTracking()
   at AJBoggs.SIS.Data.Forms.CachedFormsEntities.Refresh() in C:\GIT\lifia\sis\Data\Forms\CachedFormsEntities.cs:line 79
   at AJBoggs.SIS.Data.Forms.CachedFormsEntities..ctor(IDbContextFactory dbContextFactory, ILogger logger) in C:\GIT\lifia\sis\Data\Forms\CachedFormsEntities.cs:line 63

I am using version of VistaDB.5.NET40.dll and VistaDB.5.Web.NET40.dll of VistaDB.5.Entity.6.NET40.dll

Are there any gotchas about namespaces or not having the EDMX in the root of the project?


1 Comment

I'm not sure what exactly fixed it but I got working with the following:

Put all three EDMX meta data files in the directory with the VistaDB database

Updated versions of assemblies/packages to of VistaDB.5.NET40.dll and VistaDB.5.Web.NET40.dll of VistaDB.5.Entity.6.NET40.dll


Login to post a comment