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
0
votes
1 answer

How do I populate a LiteDB database if some of my values are null

I am populating a dataGridView from an incomplete excel spreadsheet and generating the LiteDB from the dataGridView. Before the recent update, I wasn't having any issues. Now I am getting the error 'Objects cannot be cast from DBNull to other…
topofsteel
  • 1,267
  • 6
  • 16
  • 25
0
votes
0 answers

How to auto increment a property in razor pages

I have a property for my inventorynumbers and I want to auto increment it (LiteDB, asp.net Core 3.1 razor pages) the property is a string! Is that possible???
serdar
  • 23
  • 3
0
votes
1 answer

i m trying to use LiteDb, how can i save hebrew or other languges that are not english in the database

i m trying to insert to a collection data with hebrew characters is it possible to work with LiteDb in hebrew? if yes, how?
0
votes
1 answer

Optimisation long collections (in LiteDB)

I have a class that I store in a LiteCollection: public class Message { public string Id => $"{ChannelId}-{MessageId}"; public long ChannelId { get; set; } public long MessageId { get; set; } public string Text { get; set; } …
SKProCH
  • 191
  • 1
  • 9
0
votes
1 answer

How do I set up a Custom Type in LiteDb?

I am trying to serialize and deserialize a System.Drawing.Color property in LiteDb. I've read the article below, but have no idea how to implement this in code: LiteDb Docs Here's an example of the poco class: Public Class mPage
stigzler
  • 793
  • 2
  • 12
  • 29
0
votes
2 answers

How to pass type of a ObservableCollection

I have a function similar to this one and i can't edit it: internal object DoSomething(Type type, object obj) I need to pass type as type of an ObservableCollection but T is unknown at design time. And this is not enough: Type t =…
Noschema
  • 31
  • 6
0
votes
1 answer

Handling inner changes of class in collection

I don’t know how to explain it correctly, but I have a collection of classes: using (var db = new LiteDatabase(@"MyData.db")) { var _collection = db.GetCollection("mycollection"); } public class TestClass { public TestClass() { …
SKProCH
  • 191
  • 1
  • 9
0
votes
1 answer

Performance issue while converting to .ToList() while executing LINQ from LiteDB approx. 1 million records

I am using LiteDB to store approx.1 million records. When i retrieve records from LiteDb after filtering and convert .ToList() from IQueryable, it is very slow even the result of the query is just one record. I am really stuck on this. I found that…
0
votes
0 answers

Take first item from enumerable took long time

I have big LiteDB collection of items. I just want to find last one added by some criteria. Criteria are in lambda expression. My problem is, that it took realy long time (now around 2-3sec) and I just have testing database. In full mode, there will…
110mat110
  • 564
  • 6
  • 26
0
votes
1 answer

Collection.Find(....), Collection.FindAll() All throwing exception with message "value can not be null parameter name method"

Person Model: public class Person { public Int32 Id { get; set; } public String Name { get; set; } } Find Person from DB: public List find() { using (var db = new LiteDatabase(DatabasePathProvider.CacheLiteDbPath)) { …
manvendra yadav
  • 129
  • 1
  • 7
0
votes
1 answer

Problem inserting C# POCO class in LiteDB

I have the following code to insert my POCO into a LiteDB instance. Here is the POCO: public class FileTranslationData { public Guid Id { get; set; } public string FileLocation { get; set; } public string FileJSONLocation { get; set;…
john
  • 1,273
  • 3
  • 16
  • 41
0
votes
1 answer

How to Group by on the List<> property in LiteDB

I have following class where a Post can have many tags public class Post { public string Title {get;set;} public string Summary {get;set;} public List Tags {get;set;} } I would like to get all the Posts grouped by tags if the a tag…
resp78
  • 1,414
  • 16
  • 37
0
votes
1 answer

LiteDB - Selecting multiple entries with one id

Okay, apologies if the title is misleading, I couldn't find the right wording for it. So I have a collection from which I want to count all entries with UserId where the StatusId is a value. I'm looking for something similar/the same as the SQL…
0
votes
2 answers

How can I get the root of my project in ASP.NET and not the location of IIS Express using .CurrentDirectory()?

I have an ASP.NET Core project that I'm developing and I'm making use of LiteDB as a database solution. In order to instantiate my database I need to provide a URI so that the program knows where to create the database. Usually I'd do something like…
Jake12342134
  • 1,539
  • 1
  • 18
  • 45
0
votes
1 answer

Store liteDB documents in the cloud (azure) blob storage

I am using lightDB as a local database in my iOS and android app implemented in Xamarin Forms. I am trying to store my local liteDB in the cloud using Azure. We have implemented a REST api which can receive a byte[] but I am having problem getting…
slimjim10
  • 1
  • 1