Question

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

Was it helpful?

Solution

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...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top