Code First ctp5 example that works with SQLite
-
- Posts: 8
- Joined: Mon 28 Feb 2011 22:34
Code First ctp5 example that works with SQLite
I'm looking for a Code First ctp5 example that works with SQLite. I have been killing myself over the last few days. Anyone have any code samples with the connection string as well. It seems that I am having issues with not using the required Metadata keyword correctly. But even there I am not sure because I am don't know how this all works together. I need a working example really.
Take a look at this article, it deals with Code First support peculiarities in dotConnects.
The sample is available for download here.
The sample is available for download here.
-
- Posts: 8
- Joined: Mon 28 Feb 2011 22:34
sample
First off, thanks for replying. And the example is pretty extensive and helpful compared to anything else I have seen on the subject. The problem is that it doesn't work. It compiles. And I have spent a couple hours trying to get it to run but it doesn't. I am still trying to find the source of the problem, but this is the exception:
{"SQLite error\r\nno such table: TEST.Company"}
Any ideas?
{"SQLite error\r\nno such table: TEST.Company"}
Any ideas?
-
- Posts: 8
- Joined: Mon 28 Feb 2011 22:34
fixed it
I figured it out. The default schema for the MySqliteContext class is "Main", but the SchemaName for the Entities in Entities.cs is "TEST". Cracked open the sqlite file to verify the database name is "Main". I changed the schemaname for all of the Entities to "Main", works fine.