Posts

Showing posts from February, 2023

Setup and Use SQLite with .NET MAUI - Tutorial and Code Examples

Image
 I was recently working on a .NET MAUI mobile app and needed some data to persist between launches. I know from experience that SQLite is a very common approach to storing data locally on mobile devices so I began implementing it. As usual, the road to success was bumpy and I hit an error immediately and wrote about fixing it fairly quickly in  Using SQLite as a Local Database With .NET MAU  (resolving missing SQLitePCLRaw.provider.dynamic_cdecl). This issue is a problem one would encounter when setting up the NuGet packages. This post was pretty small, so I decided to write this post on the entire process of setting up and using SQLite with .NET MAUI. 1) Install the SQLite NuGet packages In order to use SQLite, you will need "sqlite-net-pcl" and "SQLitePCLRaw.provider.dynamic_cdecl." I attempted to follow Microsoft's instructions and use "SQLitePCLRaw.bundle_green" in place of SQLitePCLRaw.provider.dynamic_cdecl" but I continued to get FileNotFou...