title: Using SQLite in C#, how to update and work with a generated database file?
body: <p>I am developing a .NET (C#) application with a binary file format. The plan is to migrate to binary format to an SQLite database file which is easier to maintain.</p>
  
  <p>I have never used this before so I have a few questions.</p>
  
  <ol>
  <li><p>The SQLite implementation of <a href="http://sqlite.phxsoftware.com/" rel="nofollow">http://sqlite.phxsoftware.com/</a> contains a LINQ provider. I have played with it locally, but I somehow have to incorporate this into something a team of developers can use. I can place the database file on my PC in a folder which is included in the source repository, but eventually it should end up in the clients AppData folder. How can I achieve this using a generated database file? When I create the database file manually I can easily tell the application where to store it.</p></li>
  <li><p>I have a fair knowledge of SQL queries, so my initial plan was to create a library which does a port of a DataModel to the database using SQL queries. The downside of this is that when a field changes or is added I have to update a lot of things: The database create query, the database update or alter queries, the DataModel. From what I gather I can create a database using the designer, but when my application is updated to version 2 next month and my database changes I want to migrate the user's existing database to the new version. Doing this manually I can write update queries and work with some sort of incremental database counter to check this, but how does this work using a generated database?</p></li>
  </ol>
  
  <p>So is it better, easier and safer to use SQL queries directly, or can someone point me to a decent usable use-case of using a generated database?</p>
  
  <p>Thanks.</p>