Connection String Trouble MetaDataException

拟墨画扇 提交于 2019-11-29 17:18:49

This looks like it's related to this problem:

http://forums.devart.com/viewtopic.php?t=21488

This article recommends two approaches. 1.Disable Conventions (I wouldn't recommend this) 2.Use OracleEntityProviderConfig to configure Workarounds.IgnoreSchemaName = true

They also mention using a specific DbContext Template, which you can find from this article (I hate just posting links, but there's way too much information there to summarize):

http://blog.devart.com/entity-developer-ef-code-first-dbcontext-template.html

However, this was written for EF 4.1, and you don't say what version of EF you're using... so i'm not sure if any of this still applies to whatever version you may be using.

So the gist is that you can't just replace the provider with no other changes. You're going to have to make some other changes, and I would suggest generating code with the DevArt DbContext template using similar code and see what it produces, then put that code in your app.

Also, your code is obviously wrong. You're using connection strings that don't exist (You say the the connection string is called Entities, but your code is using a connection string called EntitiesMAE), you also say your second context is called UserContext, but your code is called EntitiesMAE. I suggest cleaning up your code so that it has your REAL code, because otherwise we're just trying to help you with code that isn't valid.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!