SQLite

Intro to LiteDB for .NET Developers. Sample WebApp Included

This article will look closely at LiteDB, a .NET NoSQL Document Store in a single data file. We will discover the advantages of LiteDB and why it is a viable candidate for your next project. We will also explore the differences between a NoSQL and a classical SQL database and what this has to do with the reminiscent SQL CE or the more modern SQLite database. Lastly, we will develop a sample .NET WebApp using Uno Platform and LiteDB. .NET WebApp Sample LiteDB LiteDB is a document store that gets saved into a single file. That means that all your data resides in a single file. If you remember the good old times’ citation needed, you might remember SQL Server Compact, a single file database based on the SQL Server. A modern version would be SQLite, which is also a single-file database. All of them are serverless, meaning you don’t need to install anything additional, which runs in a background thread and does all the work. This simplicity enables a wide variety of scenarios (especially for rapid prototyping). Some more points, which are listed on their GitHub page: Serverless NoSQL Document Store Simple API, similar to MongoDB 100% C# code for .NET 4.5 / NETStandard 1.3/2.0 in a single DLL (less than 450kb) Thread-safe

SQLite .NET, OneDrive & Uno Platform (Part 1)

  References, Tools, Frameworks & Operating System used. Items Links Windows 10 or 11 Download Windows 10 (microsoft.com) Visual Studio 2019 or 2022 Visual Studio: IDE and Code Editor for Software Developers and Teams (microsoft.com) Visual Studio Code Visual Studio: IDE and Code Editor for Software Developers and Teams (microsoft.com) Uno Platform Project Template Uno Platform Solution Templates – Visual Studio Marketplace SQLite .NET NuGet Package NuGet Gallery | SQLiteNetExtensions 2.1.0 Bogus .NET NuGet Package NuGet Gallery | Bogus 33.1.1 SQLite Explorer extension for Visual Studio Code SQLite – Visual Studio Marketplace Data persistence is a critical part of any software system (except when you’re trying not to be found 😉). it’s storage locations and types are of critical importance primarily because these factors into the speed of accessing transforming and visualizing of data. In the space of mobile and desktop applications, local store data is of prime importance because this delivers the feature of data persistence however, a problem arises when you want to share your data across several devices think accessing the number of due invoices from your phone when the data is stored on your laptop. This gives rise to a need for portability and syncing of

Uno Platform SQLite for WebAssembly support on .NET 5 and .NET 6

WebAssembly Support for SQLite and Erik Sink’s SQLitePCL.raw has been present in Uno Platform for quite some time now, when running under the mono runtime but .NET 5+ support was missing. We’re pleased to announce that support has now been added in our SQLite provider for WebAssembly starting from 3.1.1, allowing to build with the latest and greatest features available, alongside with Entity Framework Core 6 previews and the Frank Krueger‘s awesome sqlite-net-pcl library. We’ve updated our online sample repository for you to try SQLite and EntityFramework Core directly in your browser: https://sqliteefcore-wasm.platform.uno   Getting started using SQLite in your browser You can find an up-to-date documentation for this walkthrough here, the full example for this tutorial here, and Entity Framework Core sample here. First, you’ll need to setup your environment using our getting started steps. Once you’re done, you can create a new application using our visual studio extension or dotnet new templates. You’ll then need to add new dependencies in your application as follows: <PackageReference Include=”sqlite-net-pcl” Version=”1.7.335″ /> <PackageReference Include=”Uno.SQLitePCLRaw.provider.wasm” Version=”3.1.1″ /> <!– Required when using sqlite-net-pcl which otherwise overrides the WebAssembly compatible version of the SQLitePCL.raw provider. –> <PackageReference Include=”SQLitePCLRaw.bundle_green” Version=”2.0.5-pre20210521085756″ IncludeAssets=”none” />   Once done, in

Working with SQLite and WebAssembly for .NET Developers

With recent updates of the mono runtime, and the reactivity of the .NET team to fix issues, it’s now possible to use SQLite with the Uno WebAssembly Bootstrapper and Uno Platform apps.This support is now enabled through WebAssembly static linking, and the reuse of LLVM bitcode compiled source, such as SkiaSharp or SQLite. It allows for an easy use of code written in other languages, from an app built with C#. With the Erik Sink’s recent updates to SQLitePCLRaw 2.0, it’s now possible with .NET for WebAssembly to use the existing official packages. This also enables Entity Framework Core 3.1, and Frank Krueger’s SQLite-net to work out of the box without any specific configuration for WebAssembly. About Uno Platform For those new to Uno Platform – it enables for creation of single-source C# and XAML apps which run natively on iOS and Android, macOS and Web via WebAssembly. Uno Platform is Open Source (Apache 2.0) and available on GitHub. To learn more about Uno Platform, see how it works, or create a small sample app.   Client-side SQLite and Entity Framework Core In order to demonstrate the use of client-side only technologies in the browser, we’ve updated our SQLite 3.3 + EFCore 3.1