SQLite.Framework
4.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SQLite.Framework --version 4.1.0
NuGet\Install-Package SQLite.Framework -Version 4.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SQLite.Framework" Version="4.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SQLite.Framework" Version="4.1.0" />
<PackageReference Include="SQLite.Framework" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SQLite.Framework --version 4.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SQLite.Framework, 4.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SQLite.Framework@4.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SQLite.Framework&version=4.1.0
#tool nuget:?package=SQLite.Framework&version=4.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SQLite.Framework
A lightweight ORM for SQLite, designed for .NET MAUI with AOT support and LINQ-style IQueryable querying.
Features
- AOT-ready: Designed for Ahead-Of-Time compilation in .NET MAUI apps.
- IQueryable interface: Write LINQ queries against your SQLite database.
- Inspired by EF & sqlite-net-pcl: Familiar patterns with minimal overhead.
Documentation
- GitHub Wiki - browse the docs on GitHub
- GitHub Pages - the same docs as a standalone site
Installation
Install via NuGet:
dotnet add package SQLite.Framework
Quick Start
Define your model:
public class Person { [Key, AutoIncrement] public int Id { get; set; } public required string Name { get; set; } public DateTime? BirthDate { get; set; } }Initialize the context:
using SQLite.Framework; var context = new SQLiteDatabase("app.db"); context.Table<Person>().CreateTable();On the table class, you can use the following:
- The [Table] attribute to specify the table name.
- The [WithoutRowId] attribute to use the without rowid optimization.
On the class properties:
- The [Column] attribute specifies the column name.
- The [NotMapped] attribute ignores the property.
- The [Key] attribute specifies the primary key.
- The [Index] attribute creates an index on the column or make a column unique.
- The [AutoIncrement] attribute is used to specify that the column should be auto-incremented.
- The [Required] attribute is used to specify that the column is NOT NULL (columns are NOT NULL by default, but using the ? operator marks them as nullable).
Query with LINQ:
// Insert context.Add(new Person { Name = "Alice" }); // Query var results = context.Table<Person>() .Where(p => p.Name.StartsWith("A")) .OrderBy(p => p.Id) .Select(p => new { p.Id + 1, p.Name }) .ToList();Async query with LINQ:
// Insert await context.AddAsync(new Person { Name = "Alice" }); // Query var results = await context.Table<Person>() .Select(p => p.Id) .ToListAsync();
AOT Support
In order to use this library in AOT scenarios, you need to make sure the objects you are querying are either:
- Part of the assembly that is being AOT compiled (the user's code).
- Or simply make sure the classes are referenced in your code.
Contributing
Feel free to:
- Report bugs or missing features.
- Submit PRs to add functionality or tests.
License
MIT © Nikolay Kostadinov
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- SQLitePCLRaw.bundle_green (>= 2.1.11)
-
net8.0
- SQLitePCLRaw.bundle_green (>= 2.1.11)
-
net9.0
- SQLitePCLRaw.bundle_green (>= 2.1.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.1.2 | 26 | 4/1/2026 |
| 4.1.1 | 21 | 4/1/2026 |
| 4.1.0 | 32 | 3/31/2026 |
| 4.0.0 | 47 | 3/29/2026 |
| 3.1.0 | 412 | 11/18/2025 |
| 3.0.0 | 311 | 11/17/2025 |
| 2.4.0 | 164 | 7/10/2025 |
| 2.3.0 | 193 | 7/9/2025 |
| 2.2.0 | 168 | 7/9/2025 |
| 2.1.1 | 133 | 6/27/2025 |
| 2.1.0 | 168 | 6/23/2025 |
| 2.0.0 | 182 | 6/4/2025 |
| 1.4.1 | 168 | 6/1/2025 |
| 1.4.0 | 166 | 6/1/2025 |
| 1.3.1 | 182 | 5/19/2025 |
| 1.3.0 | 274 | 5/13/2025 |
| 1.2.1 | 278 | 5/12/2025 |
| 1.2.0 | 168 | 5/11/2025 |
| 1.1.2 | 164 | 5/9/2025 |
| 1.1.1 | 186 | 5/8/2025 |
Loading failed