-
Notifications
You must be signed in to change notification settings - Fork 0
Home
github-actions[bot] edited this page Mar 31, 2026
·
12 revisions
A lightweight ORM for SQLite, built for .NET. It gives you LINQ queries, async support, and AOT compatibility, with an API that will feel familiar if you have used Entity Framework before.
using SQLiteDatabase db = new("library.db");
var books = db.Table<Book>();
await books.CreateTableAsync();
await books.AddAsync(new Book { Title = "Clean Code", Price = 29.99m });
var affordable = await books.Where(b => b.Price < 30).ToListAsync();| Package | When to use |
|---|---|
SQLite.Framework |
Default. Uses the SQLite version that ships with the OS. Works on all major platforms. |
SQLite.Framework.Bundled |
Ships its own SQLite binary. Use this when the OS-provided SQLite is too old or you need a specific version. |
SQLite.Framework.Cipher |
Uses SQLCipher for encrypted databases. Set the Key property before the first operation to enable encryption. |
SQLite.Framework.Base |
No SQLite provider included. Use this when you want to supply your own SQLitePCLRaw provider. You are responsible for calling SQLitePCL.Batteries_V2.Init() before creating a database. |
All packages expose the same API and assembly name, so you can swap between them without changing any code.
- LINQ queries with
IQueryablesupport - Async versions of every operation
- CRUD operations with typed tables
- Joins, group by, aggregates, and subqueries
- Bulk delete and update with
ExecuteDeleteandExecuteUpdate - Transactions using SQLite savepoints
- Raw SQL via
FromSql - AOT compatible, works great in .NET MAUI apps
- Supports .NET 8, 9, and 10
- Getting Started
- Defining Models
- CRUD Operations
- Querying
- Expressions
- Subqueries
- Joins
- Grouping and Aggregates
- Bulk Operations
- Transactions
- Multi-threading
- Raw SQL
- Common Table Expressions
- Data Types
- Storage Options
- Custom Converters
- JSON and JSONB
- Performance
- Native AOT
- Migrating from sqlite-net-pcl