views:

22

answers:

0

Querying with Entity Framework 4 with a SQLite (v3) database through the sqlite.phxsoftware.com ADO.NET provider (v1.0.66.0), I'm facing the following NotSupportedException while casting the retrieved Int64 properties:

Unable to cast the type 'System.Int64' to type 'System.Object'. LINQ to Entities only supports casting Entity Data Model primitive types.

My EDMX model was created automatically from the SQLite database with the wizard.

This issue seems to be the very same as: http://stackoverflow.com/questions/3197109/entity-framework-4-column-conversions-sql-server-sqlite

Unfortunately, nobody seems to have a solution and the author has given up...

Any idea of what is going on here and how to work around this?

Thanks for help.

Olivier