views:

69

answers:

2

Hi,

VS2010/EntityFramework - Is it possible to execute generated sql for a Sqlite database? (like you can for SQL Server).

When I try to do this I only seem to get SQL Server type options re which database to execute the SQL against (even though my Entity Framework design was based on the initial/successful upload from a SQLite database)

EDIT: I can create an entity model ok from import from a sqlite database, BUT when I try to generate SQL code it doesn't seem to be standard sql (perhaps it is Sql Server syntax or something). And if I try to run the sql it wants to connect me to a sql server database (not the connection I had to the sqlite database I used to create the entity framework model)

+1  A: 

You're looking for the SQLite provider for the Entity Framework

SLaks
I've already got this, and I can create an entity model ok from import from a sqlite database, BUT when I try to generate SQL code it doesn't seem to be standard sql (perhaps it is Sql Server syntax or something)
Greg
+1  A: 

Try dotConnect for SQLite.

Devart
Greg
All SQL is generated by the provider. Visual Studio and the EF do not generate SQL. So if the SQL is wrong, then either you have a buggy provider, you're using a DB server version not supported by the provider, or you're using the provider incorrectly.
Craig Stuntz
ok, so Devart has a real point then re giving it I try then is what I'm hearing - thanks
Greg
I have dotConnect loaded. Seems to allow DB to Class generation, but can't see any way to do Class to DB?
Greg
Unfortunately, there is no Model First support for SQLite at the moment. We are working on it.
Devart