Questions tagged [litedb]

Use this tag for questions about LiteDB, which is a a free, open-source, embedded NoSQL database for .NET available via nuget or direct download.

LiteDB is a free, open-source, embedded NoSQL database for .NET inspired by MongoDB. Because it is a serverless document store, LiteDB can be "installed" via NuGet or by copying a dll into your project's bin folder.

Resources

Related Tags

183 questions
1
vote
1 answer

How to solve LiteDB implementation error?

I'm new to C#. I'm trying to setup LiteDB for Blog in .Net Core 3.1. namespace Blog.Repos { public class BlogRepo { public LiteDatabase DB { get; set; } public LiteCollection Posts { get; set; } public BlogRepo() { …
ste4lth
  • 119
  • 10
1
vote
1 answer

LiteDb v5 Query.All() equivalent

What is the BsonExpression equivalent of Query.All() in LiteDb v5? I'm having trouble finding BsonExpression that translates to 'all results'. I have a helper class that generates Query in LiteDb v4. So I'm trying to port my helper class to be able…
Nik A.
  • 454
  • 6
  • 15
1
vote
0 answers

How to output LiteDB query results as string?

I'm trying to set up a ListView that will output all the results from a search query with LiteDB. Unfortunately, I'm having trouble finding a way to get the results into the ProductName string format. I've tried multiple different ways to no…
kal256
  • 11
  • 2
1
vote
1 answer

How to change the DB location using c# Litedb (noSQL)?

I'm new to noSQL and trying to use litedb. I want to change the location of the db storage. Right now this code: using (var db = new LiteDatabase(@"MyData.db")) { } Creates the database at projectName\bin\Debug Is there a way to create the DB from…
Sergio
  • 57
  • 2
  • 10
1
vote
0 answers

How to save a private field with LiteDB

Is there an attribute for private properties to be stored with the LiteDB engine? I want to store this property in the LiteDB database private string SomeGoodPropertyName { get; set; } Is there an exact opposite of the [BsonIgnore] attribute, (like…
Luchspeter
  • 744
  • 7
  • 24
1
vote
2 answers

How to cast type 'LiteCollection' of LiteDB to 'Ienumerable'?

i use a database which is named LiteDB. this is a Nosql and free database for Dot-net. when i access my tables it returns a collection named 'LiteCollection'. I want to iterate over it. but it doesn't implement Getenumerator() method. and there is…
Hamed Sanaei
  • 121
  • 13
1
vote
1 answer

LiteDB - Multiple entries with same ID

I have a Warning model, with which I insert warnings into LiteDB. I want to be able to insert warnings with the same UserId, like in SQLite, but I get this error: Cannot insert duplicate key in unique index '_id'. The duplicate value is…
1
vote
0 answers

How to exclude heavy columns

I'm pretty new to Xamarin.Forms as well as LiteDB I'm trying to query a table that I know has one very heavy column, but I do not need this column in this query At the moment the query is very slow. In my SQL Server background, I would write a…
Yisroel M. Olewski
  • 1,560
  • 3
  • 25
  • 41
1
vote
0 answers

F# LiteDB [] is Ignored?

Context: Running F# in a containerized environment $ dotnet --version 2.2.203 $ uname -a Linux SAFE 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 GNU/Linux on Ubuntu 18.04 desktop machine. This simple code ignores the…
Santi
  • 491
  • 6
  • 14
1
vote
1 answer

LiteDB Update collection

I'm testing LiteDB database but have an issue on updating a data. Let's consider the source code: public class Session { [BsonId] public int Id { get; set; } public Guid SessionGuid { get; set; } public…
Gizmo
  • 66
  • 2
  • 7
1
vote
2 answers

Get Most Recent Insert In LiteDB c# .net

I'm working on creating a method that gets the last transaction inserted into litedb. I do have a datestring, that is saved. Here is the class: public class TransactionPair : TransactionTwo { private string returnT; public TransactionPair()…
Holly Plyler
  • 339
  • 2
  • 10
1
vote
0 answers

C# LiteDB - Index and search text blocks

Use Case: OCR PDFs, index the text and make the text searchable Say I have a class like: public class Scan { public int Id { get; set; } public string Name { get; set; } public int PageNumber { get; set; } public string[] Names {…
WernerCD
  • 2,137
  • 6
  • 31
  • 51
1
vote
0 answers

How to iterate through LiteDB.LiteCollection for specific key values from a large litedb database file

I am creating a standalone database using LiteDB with C# code for storing every files metadata like filesize, absolute path ,createtime, extension etc. I am having problem in querying and iterating for the exact key value from the db file, please…
1
vote
1 answer

LiteDB how to insert list of list of object

I'm struggling to insert/update my class with a list of list of object into my LiteDB database. I tried several things and possible solutions, but I can't get it working. Here my classes: Parent: [BsonRef("pictogram")] public class Pictogram :…
1
vote
0 answers

Blazor LiteDB query issue

I have created a project using .Net Core, Blazor, and LiteDB. There are a few articles out there which reference using LiteDB with core so I don't think there is an issue there. Here is my…
Night Channels
  • 342
  • 1
  • 4
  • 12