Click here to Skip to main content
15,885,953 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does anyone know how to get generate an entity framework model from a SQLite database using the latest System.Data.SQLite builds?

Doing this with the old builds is easy because they automatically integrate with Visual Studio, but their EF support was still a bit too buggy for me. That's why I don't use their EF components. Yet, I'm currently stuck using a SQLite database in a Win Forms application, and the data structure is complex enough to take forever for me to code up all reading/writing structures myself.

<Addition: May 21st, 2012>
I've done some additional experimentation on an Win XP SP3 virtual machine with VS 2010 Pro and found the following. After running the new System.Data.SQLite installer, I ran the installer for the design-time components that was placed in the bin directory.

* The first time I ran it, I got a pop-up telling that the Confirm option wasn't enable so it failed.

* Then I ran it from the command line as: Installer -Confirm True

** This time it didn't say anything about failing, but I did go over the command line to find that towards the end it said that no changes were made because the What If option enabled.

* This time I ran: Installer -Confirm True -WhatIf False

** This added System.Data.SQLite Database File as an option for my DataSources when creating a new database connection. Yet, when I select a database or created a new one to enter the Database Path, all pop-ups used for inserting the database connection close.

** I tried inserting the path do a SQLite database manually when creating a new connection, and VS froze when I tested connection.

That's pretty much where I'm at with this right now.
Posted
Updated 21-May-12 13:59pm
v2

Just install the X86 bundle. Then mark the installer as 32 bit with this command:

corflags /32BIT+ /Force Installer.exe
(use vs command prompt)

After that use this command:
installer -confirm true -whatif false -install true
 
Share this answer
 
SQLite provider should be available in VS(Visual Studio). you can run the "Design-Time Configuration" tool from the SQLite.NET menu (in Windows Start menu) to register the provider with VS.

Note that if you're using an Express version of VS, you can't add third-party ADO.NET providers. Nice CodeProject article is available at Using SQLite Embedded Database with Entity Framework and Linq-to-SQL[^]
 
Share this answer
 
Comments
Francisco T. Chavez 18-May-12 21:44pm    
Sorry, but the question was how to do this with the new builds, not the old ones.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900