After hours of experiments I eventually managed to get some rows out of some SQLite tables, some, not all. This:
[FooId] [int] IDENTITY(1,1) CONSTRAINT PK_Foo PRIMARY KEY Does not work and creates some sort of numeric column that does not increment and has 1 in all rows. You have to specify [INTEGER] as the column type. [int] and [INTEGER] are not the same. At one point I was told that an In64 could not be cast to an Int32, but I forget why in the confusion of changes. Some subtly incorrect SQLite column definition was causing EF4 to return null entities, but I don't know exactly what it was. Now I'm having trouble with SQLite DATETIME columns. A LINQ Select is crashing with DateTime parse error and I can't find where. One datetime column I can read okay, the other crashes when I access it. The latter is nullable, but it has valid non-null data in all rows. So nullable datetime fields are un-parseable?! I have now spent 4 hours of evening time trying to get 20 lines of childishly simple code working to prove that I can read rows out of SQLite with EF4. But as usual, just as I think the answer is in sight, another door slams in front of me and the hours drain away as I pick the locks and prise the hinges off ... and my life drains away. Everything f***ing doesn't work. Greg
