Key Int32 incompability
Posted: Tue 09 Mar 2010 14:13
Hi,
I have database HelpDesk where 2 tables are associated with OneToMany relation. When I lunch my c# application it crashes with this message:
I don't know if dataContex file is corrupt or column types in database are wrong or something else.
I generated datacontex with reverse enginering wizard. Strange was it didn't created association automatically (like another beetwen other tables and it works fine). I had to create association manually.
I'm almost sure that there is something wrong with that manually added relation but i didn't find anything wrong in datacontext file.
thx for every help and any directions.
I have database HelpDesk where 2 tables are associated with OneToMany relation. When I lunch my c# application it crashes with this message:
Code: Select all
Unable to cast object of type 'Devart.Data.Linq.EntityCache`2[HelpDesk.podrodzaj,Devart.Data.Linq.Key`2[System.Int32,System.Int32]]' to type 'Devart.Data.Linq.EntityCache`2[HelpDesk.podrodzaj,System.Int32]'.
I generated datacontex with reverse enginering wizard. Strange was it didn't created association automatically (like another beetwen other tables and it works fine). I had to create association manually.
I'm almost sure that there is something wrong with that manually added relation but i didn't find anything wrong in datacontext file.
thx for every help and any directions.