Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# EF
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 18-May-12 16:31pm
Edited 21-May-12 14:59pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
Francisco T. Chavez at 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)

  Print Answers RSS
0 George Jonsson 175
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 7 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100