EF 4.3 与 Firebrid Dot Net Provider

发布于 2025-01-07 11:00:30 字数 1283 浏览 2 评论 0原文

在此处输入图像描述我安装了 EF 4.3 并且收到此错误。

“System.Data.MetadataException”类型的第一次机会异常 发生在 System.Data.Entity.dll 类型的未处理异常 System.Data.Entity.dll 中发生“System.Data.MetadataException”

Additional information: Schema specified is not valid. Errors: 
The relationship 'Model.FK_STORE_ADDRESS' was not loaded because 
the type 'Model.STORE' is not available.
The relationship 'Model.FK_USERS_ADDRESS' was not loaded because 
the type 'Model.USER' is not available.
The relationship 'Model.FK_VENDOR_ADDRESS' was not loaded because 
the type 'Model.VENDOR' is not available.
The relationship 'Model.FK_BARCODEPRINT_ITEMSTYLE' was not loaded because 
the type 'Model.ITEMSTYLE' is not available.

,并继续列出数据库中的所有表...


连接字符串如下所示,它在 EF 4.0 中工作正常

metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl; 
provider=FirebirdSql.Data.FirebirdClient;
provider connection string="user=SYSDBA;password=masterkey;database=C:\Pearlpos\Data\Store.fdb;dialect=3;charset=NONE;connectionlifetime=15;pooling=False;packetsize=8192;servertype=0;datasource=localhost"

我正在尝试使用新项目并且没有任何命名空间问题,我相信...... 搜索没有帮助。非常感谢任何帮助...

谢谢! 穆图·安纳马莱

enter image description hereI installed the EF 4.3 And I am getting this error.

A first chance exception of type 'System.Data.MetadataException'
occurred in System.Data.Entity.dll An unhandled exception of type
'System.Data.MetadataException' occurred in System.Data.Entity.dll

Additional information: Schema specified is not valid. Errors: 
The relationship 'Model.FK_STORE_ADDRESS' was not loaded because 
the type 'Model.STORE' is not available.
The relationship 'Model.FK_USERS_ADDRESS' was not loaded because 
the type 'Model.USER' is not available.
The relationship 'Model.FK_VENDOR_ADDRESS' was not loaded because 
the type 'Model.VENDOR' is not available.
The relationship 'Model.FK_BARCODEPRINT_ITEMSTYLE' was not loaded because 
the type 'Model.ITEMSTYLE' is not available.

And goes on to list all the table in the database....


The connection string is as follows and it is working fine with EF 4.0

metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl; 
provider=FirebirdSql.Data.FirebirdClient;
provider connection string="user=SYSDBA;password=masterkey;database=C:\Pearlpos\Data\Store.fdb;dialect=3;charset=NONE;connectionlifetime=15;pooling=False;packetsize=8192;servertype=0;datasource=localhost"

I am trying with a new project and there is no any namespace issues, I believe...
Search didn’t help. Any help is highly appreciated...

Thanks!
Muthu Annamalai

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓦然回首 2025-01-14 11:00:30

最后我发现了问题...部分扩展的 POCO 类未包含在模型生成中,并且无法加载类。
我将所有扩展的 Partial 类都放在同一个项目中,但文件名不同,因为 VS 只允许唯一的文件名。

好的,最后问题是分部类的名称要与生成的类(如 STORE)完全相同,不能是 Store,它应该与 STORE 完全相同,

谢谢大家...

Finally I found out the problem... Partially extended POCO Classes were not included in the model generation and not able to load the Classes.
I have all my extended Partial classes in the same project, but with different file name, as VS will allow only unique file names.

OK, Finally the problem is the name of the partial class to be exact as the generated class like STORE Cannot be Store, it should be exact as STORE

Thanks everybody...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文