EF 4.3 与 Firebrid Dot Net Provider
我安装了 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"
我正在尝试使用新项目并且没有任何命名空间问题,我相信...... 搜索没有帮助。非常感谢任何帮助...
谢谢! 穆图·安纳马莱
I 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我发现了问题...部分扩展的 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...