1

Experts,

We're trying to deploy a project to a SQL Server but see a weird error:

"The entity type EEntityInfo is not part of the model for the current context."

The error is triggered from inserting an entity of the specified type (EEntityInfo) into its collection in the DbContext.

Until deployment we've been running the project on a local SQL Express instance without any hickups. For deployment I tried to just clean up the SQLEXPRESS DB, create a new DB on the production SQL Server and then import the SQLEXPRESS DB (including data) to it.

The new DB is an exact copy as far as I can see but now I get these kinds of errors. Is there some metadata I'm unaware of, and that might have been left out of the import process? (The __MigrationHistory table was included and contains one record, identical to the original.)

Could it be that the access to the production SQL Server is different?

Any hints would be greatly appreciated!

Cheers

1
  • I experimented with different connection strings and, indeed, this was the problem. I don't know if the problem was the presence of meta data but when I recreated them using the server explorer (without meta data) the problem was resolved. If you care to convert your comment to a reply I'll go ahead and credit it as the answer. Thanks. Commented Apr 3, 2016 at 18:12

1 Answer 1

1

This error can be caused when there is meta data present in the connection string. Take the metadata tag out as suggested here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.