was successfully added to your cart.

SQLite in C# – Video and Resources

Using a Simple, Powerful, Portable Database

Have you ever wanted to store data for an application but didn’t want to deal with the hassle of a full database server? Or maybe you wanted to have one database per installation. Those and many other scenarios are a perfect fit for SQLite. Today I am going to show you how to get started using SQLite in C#. We will build a small database, attach it to a C# project, and then wire up our project to read from and write to the database.

Resources mentioned in the video

Join the discussion 2 Comments

  • Zoltan Halasz says:

    Hi Tim! I have been following your site this year using a lot of great resources related to SQL/Dapper/MVVM from your site.
    What is the advantage of above C#/SQLite solution over an MS Access 2010/2013 database app? Or over an MVVM app with SQL Server?
    I am working as a financial controller, but I am also involved in small it projects with databases (using Access and SQL server). I just want to see the use of SQLlite. Can the above solution be a multi-user one?

    • Tim Corey says:

      SQLite can definitely be multi-user through your front-end. It doesn’t have the concept of multi-user logins on the back-end but that shouldn’t be an issue. The only real limitation is that only one command can be running at a time to insert data in SQLite. However, that isn’t really an issue because calls just queue up to be written. I would definitely recommend it over Access, since Access does not pass the ACID test and it is less able to be secured. SQLite is definitely not as powerful as SQL but not every solution needs a massively powerful database engine that can handle Terabytes of data. Small projects typically benefit from using SQLite. The good news is that if you write your code properly, you can swap out SQLite for SQL later on without much, if any, difficulty.

Leave a Reply