Skip to content

LiteDB: Embedded .NET NoSQL Database

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


I was recently in the need for a simple NoSQL database that I could use for an app I was creating for a ASP.NET Core Workshop. What I was really after was something similar to SQLite.   A single package I could pull into my application that did not require any external service and data stored in a single file. It didn’t take long to find LiteDB.  After using it for my demo application, I had write a quick post about it.  Just to shed some light for anyone in need.  The project is actually really popular on GitHub, so it seems I might just be late to the party about finding out about it.

LiteDB

LiteDB is serverless database delivered in a single DLL (less than 350kb) fully written in .NET C# managed code (compatible with .NET 3.5, 4.x, NETStandard 1.3 and 2.0). Install via NuGet or just copy DLL to your bin project folder.

Sample

Similar to MongoDB

One thing to note is how the API is similar to the Mongo DB .NET driver. You also can store files like you can in GridFS.

Use Cases

I would think the use cases would be similar in terms of need for something like SQLite.  Because it supports .NET Standard, I would think Xamarin apps would be an excellent fit. Again, my application was a small local application, which was also ideal. Are you using LiteDB? Using something different? I’d love to hear what your using and your workloads which you’re using it in.  Let me know on Twitter or in the comments.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


5 thoughts on “LiteDB: Embedded .NET NoSQL Database”

  1. Coincidentally came across this project today looking for a way to store test data – it’s file storage feature solved the problem I was having (with long path names on Windows) really nicely.

Leave a Reply

Your email address will not be published. Required fields are marked *