![]() |
VOOZH | about |
dotnet add package LiteDB --version 5.0.21
NuGet\Install-Package LiteDB -Version 5.0.21
<PackageReference Include="LiteDB" Version="5.0.21" />
<PackageVersion Include="LiteDB" Version="5.0.21" />Directory.Packages.props
<PackageReference Include="LiteDB" />Project file
paket add LiteDB --version 5.0.21
#r "nuget: LiteDB, 5.0.21"
#:package LiteDB@5.0.21
#addin nuget:?package=LiteDB&version=5.0.21Install as a Cake Addin
#tool nuget:?package=LiteDB&version=5.0.21Install as a Cake Tool
👁 NuGet Version
👁 NuGet Downloads
👁 Build status
LiteDB is a small, fast and lightweight .NET NoSQL embedded database.
BsonDocument using attributes or fluent mapper APIInstall-Package LiteDBread operations (multiple readers)Write locks per collection (multiple writers)SQL-Like SyntaxNew UI to manage and visualize your database:
Visit the Wiki for full documentation. For simplified chinese version, check here.
Help LiteDB grow its user community by answering this simple survey
A quick example for storing and searching documents:
// Create your POCO class
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
public int Age { get; set; }
public string[] Phones { get; set; }
public bool IsActive { get; set; }
}
// Open database (or create if doesn't exist)
using(var db = new LiteDatabase(@"MyData.db"))
{
// Get customer collection
var col = db.GetCollection<Customer>("customers");
// Create your new customer instance
var customer = new Customer
{
Name = "John Doe",
Phones = new string[] { "8000-0000", "9000-0000" },
Age = 39,
IsActive = true
};
// Create unique index in Name field
col.EnsureIndex(x => x.Name, true);
// Insert new customer document (Id will be auto-incremented)
col.Insert(customer);
// Update a document inside a collection
customer.Name = "Joana Doe";
col.Update(customer);
// Use LINQ to query documents (with no index)
var results = col.Find(x => x.Age > 20);
}
Using fluent mapper and cross document reference for more complex data models
// DbRef to cross references
public class Order
{
public ObjectId Id { get; set; }
public DateTime OrderDate { get; set; }
public Address ShippingAddress { get; set; }
public Customer Customer { get; set; }
public List<Product> Products { get; set; }
}
// Re-use mapper from global instance
var mapper = BsonMapper.Global;
// "Products" and "Customer" are from other collections (not embedded document)
mapper.Entity<Order>()
.DbRef(x => x.Customer, "customers") // 1 to 1/0 reference
.DbRef(x => x.Products, "products") // 1 to Many reference
.Field(x => x.ShippingAddress, "addr"); // Embedded sub document
using(var db = new LiteDatabase("MyOrderDatafile.db"))
{
var orders = db.GetCollection<Order>("orders");
// When query Order, includes references
var query = orders
.Include(x => x.Customer)
.Include(x => x.Products) // 1 to many reference
.Find(x => x.OrderDate <= DateTime.Now);
// Each instance of Order will load Customer/Products references
foreach(var order in query)
{
var name = order.Customer.Name;
...
}
}
Change details for each release are documented in the release notes.
LiteDB is digitally signed courtesy of SignPath
<a href="https://www.signpath.io"> <img src="https://about.signpath.io/assets/signpath-logo.svg" width="150"> </a>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp1.0 netcoreapp1.0 was computed. netcoreapp1.1 netcoreapp1.1 was computed. netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard1.3 netstandard1.3 is compatible. netstandard1.4 netstandard1.4 was computed. netstandard1.5 netstandard1.5 was computed. netstandard1.6 netstandard1.6 was computed. netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net45 net45 is compatible. net451 net451 was computed. net452 net452 was computed. net46 net46 was computed. net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen30 tizen30 was computed. tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Universal Windows Platform | uap uap was computed. uap10.0 uap10.0 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on LiteDB:
| Package | Downloads |
|---|---|
|
DeviceDetector.NET
The Universal Device Detection library for .NET that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, feed readers, media players, PIMs, ...), operating systems, brands and models. This is a port of the popular PHP device-detector library to C#. For the most part you can just follow the documentation for device-detector with no issue. |
|
|
TIKSN-Framework
TIKSN Framework is a .NET 10 application framework and utility library for building modular services, command-line tools, data-driven applications, and .NET MAUI apps. It includes dependency injection helpers, Autofac modules, repository, query repository, file repository, stream repository, pagination, unit-of-work abstractions, Entity Framework Core, Azure Table Storage, Azure Blob Storage, MongoDB, LiteDB, and RavenDB adapters, memory, distributed, and hybrid repository cache decorators, finance and money types, pricing models, currency conversion, central-bank foreign exchange providers, globalization, language and region localization resources, JSON, XML, MessagePack, custom binary serialization, Protocol Buffers-backed licensing schema support, license generation and signature services, shell and PowerShell application infrastructure, telemetry abstractions, correlation IDs, settings, known folders, network connectivity, antimalware abstractions, versioning, numbering, time period types, REST helpers, sitemap models, and platform-specific MAUI registrations. |
|
|
FirebaseDatabase.net
Complex C# library for Firebase Realtime Database built on top of Firebase REST API. Among others it supports following: * Offline storage * Querying using available filters * Passing in authentication token * Streaming online changes * Directly Posting / Putting / Patching online data Streaming changes (both online and offline) are done using Reactive Extensions. |
|
|
LiteQueue
Lightweight, persisted, thread safe, (optionally) transactional, FIFO queue built on LiteDB. |
|
|
Node.Net
Package Description |
Showing the top 20 popular GitHub repositories that depend on LiteDB:
| Repository | Stars |
|---|---|
|
JosefNemec/Playnite
Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
|
|
|
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 11, 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
|
|
|
LykosAI/StabilityMatrix
Multi-Platform Package Manager for Stable Diffusion
|
|
|
Facepunch/sbox-public
s&box is a modern game engine, built on Valve's Source 2 and the latest .NET technology, it provides a modern intuitive editor for creating games
|
|
|
Stability-AI/StableSwarmUI
StableSwarmUI, A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
|
|
|
mcmonkeyprojects/SwarmUI
SwarmUI (formerly StableSwarmUI), A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
|
|
|
PCL-Community/PCL-CE
PCL 社区版 由社区开发者维护与管理
|
|
|
JavScraper/Emby.Plugins.JavScraper
Emby/Jellyfin 的一个日本电影刮削器插件,可以从某些网站抓取影片信息。
|
|
|
p-org/P
The P programming language.
|
|
|
ChangemakerStudios/Papercut-SMTP
Papercut SMTP -- The Simple Desktop Email Server
|
|
|
SeriaWei/ZKEACMS
ZKEACMS build with .Net 8 (.Net CMS)可视化设计在线编辑内容管理系统
|
|
|
dotnetcore/EasyCaching
:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
|
|
|
kangyu-california/PersistentWindows
fork of http://www.ninjacrab.com/persistent-windows/ with windows 10 update
|
|
|
Cysharp/MasterMemory
Source Generator based Embedded Typed Readonly In-Memory Document Database for .NET and Unity.
|
|
|
chocolatey/ChocolateyGUI
A delicious GUI for Chocolatey
|
|
|
openbullet/openbullet
The OpenBullet web testing application.
|
|
|
chatop2020/AKStream
AKStream是一套全平台(Linux,MacOS,Windows)、全架构(X86_64,Arm...)、全功能的流媒体管理控制接口平台。集成GB28181,RTSP,RTMP,HTTP等设备推拉流控制、PTZ控制、音视频文件录制管理、音视频文件裁剪合并等功能与一体
|
|
|
Flangvik/TeamFiltration
TeamFiltration is a cross-platform framework for enumerating, spraying, exfiltrating, and backdooring O365 AAD accounts
|
|
|
tmoonlight/NSmartProxy
NSmartProxy是一款开源的内网穿透工具。采用.NET CORE的全异步模式打造。(NSmartProxy is an open source reverse proxy tool that creates a secure tunnel from a public endpoint to a locally service.)
|
|
|
GoldenPotato137/PotatoVN
一款Visual Novel管理软件
|
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.0-prerelease.77 | 2,906 | 2/27/2026 |
| 6.0.0-prerelease.76 | 137 | 2/27/2026 |
| 6.0.0-prerelease.75 | 2,053 | 1/29/2026 |
| 6.0.0-prerelease.74 | 593 | 12/28/2025 |
| 6.0.0-prerelease.73 | 3,996 | 10/28/2025 |
| 6.0.0-prerelease.71 | 227 | 10/28/2025 |
| 6.0.0-prerelease.67 | 246 | 10/26/2025 |
| 6.0.0-prerelease.66 | 396 | 10/26/2025 |
| 6.0.0-prerelease.65 | 675 | 10/8/2025 |
| 6.0.0-prerelease.64 | 221 | 10/8/2025 |
| 6.0.0-prerelease.63 | 260 | 10/7/2025 |
| 6.0.0-prerelease.62 | 232 | 10/5/2025 |
| 6.0.0-prerelease.57 | 210 | 10/5/2025 |
| 6.0.0-prerelease.56 | 200 | 10/5/2025 |
| 6.0.0-prerelease.55 | 302 | 10/1/2025 |
| 6.0.0-prerelease.53 | 221 | 10/1/2025 |
| 6.0.0-prerelease.52 | 261 | 9/30/2025 |
| 6.0.0-prerelease.51 | 234 | 9/28/2025 |
| 6.0.0-prerelease.50 | 199 | 9/28/2025 |
| 5.0.21 | 8,571,129 | 7/5/2024 |