Fork me on GitHub

Standalone database

LiteDB is serverless database delivered in a single DLL (less than 200kb) fully written in C# managed code.

Install via NuGet or just copy DLL to your bin project folder.

Fast and lightweight

LiteDB is a simple and fast NoSQL database solution. Ideal for:

And much more...

// Basic example
public class Customer
    public int Id { get; set; }
    public string Name { get; set; }
    public string[] Phones { get; set; }
    public bool IsActive { get; set; }

// Open database (or create if not exits)
using(var db = new LiteDatabase(@"MyData.db"))
    // Get customer collection
    var customers = db.GetCollection<Customer>("customers");

    // Create your new customer instance
    var customer = new Customer
        Name = "John Doe", 
        Phones = new string[] { "8000-0000", "9000-0000" }, 
        IsActive = true

    // Insert new customer document (Id will be auto-incremented)

    // Update a document inside a collection
    customer.Name = "Joana Doe";


    // Index document using a document property
    customers.EnsureIndex(x => x.Name);

    // Use Linq to query documents
    var results = customers.Find(x => x.Name.StartsWith("Jo"));