Questions tagged [sqlite-net-extensions]

SQLite-Net Extensions is a very simple ORM that provides one-to-one, one-to-many, many-to-one, many-to-many, inverse and text-blobbed relationships on top of the sqlite-net library.

SQLite-Net Extensions is a very simple ORM that provides one-to-one, one-to-many, many-to-one, many-to-many, inverse and text-blobbed relationships on top of the sqlite-net library.

sqlite-net is an open source, minimal library to allow .NET and Mono applications to store data in SQLite 3 databases. SQLite-Net Extensions extends its functionality to help the user handle relationships between sqlite-net entities.

148 questions
4
votes
1 answer

sqlite.net table where condition on a child table

I'm using Xamarin forms, SQLite.net and SQLitenet extensions and I'm unable to figure out why something that I would expect to be simple just doesn't work. I have two classes public class MeasurementInstanceModel { public…
user1428857
  • 73
  • 1
  • 2
  • 5
3
votes
0 answers

Retrieve data from sqlite net with parameters and blob

I'm using sqlite-net and sqlite-net-extensions for the blob in a Xamarin.Android project. I have this schema: public enum TemplateCategories { Emojis, Stars, Hearts, Characters, Emotions, } public…
CDrosos
  • 2,418
  • 4
  • 26
  • 49
3
votes
1 answer

TextBlob is null

I am working with SQLite for the first time, I have working on a student project, and I have done a lot of research, but I cannot fix my problem. I am trying to use sqlite-net-extensions, but my TextBlob is always null. How can use the methods with…
DoubleD
  • 148
  • 10
3
votes
2 answers

Xamarin.Android: SQLite-Net Extensions many-to-many - no such table, NULL collection

I've installed SQLite-Net Extensions package into my Xamarin.Android project in Visual Studio 2015 and I'm trying to implement many-to-many relationship between Person and Event entities. I've followed the official documentation of the library, but…
3
votes
2 answers

Android - The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3

On our Xamarin Android project we are trying to switch from sqlite-net to official sqlite-net-pcl package. However after this switch when creating a new SQLiteConnection I am getting following exception: The type initializer for…
3
votes
1 answer

Sqlite-net extensions relations always null

I am trying to use the extension in MvvmCross 4. What I am trying to do is simple: I have two tables with a one to many relationship and and want to access this. I have two classes, BusLine and BusLineGroup. Each BusLine has one Group as foreign…
Felix
  • 6,885
  • 1
  • 29
  • 54
3
votes
0 answers

SQLite.Net OrderBy function returns Null reference exception

Platform: Windows 8.1 Universal sqlite-net 1.0.8 previously see edit below SQLite.Net PCL 3.1.1 current Working I had a Table public class CommandData { [PrimaryKey, AutoIncrement] [Column("Id")] public Guid Id { get; set; } …
Barnstokkr
  • 2,904
  • 1
  • 19
  • 34
3
votes
1 answer

Is there a way to limit / page result sets

Is there a way to limit / page result sets using GetAllWithChildren() or GetAll() or GetAllWithChildrenAsync() or GetAllAsync(). These methods accept a filtering expression but it doesn't appear that there is any straightforward way of setting an…
dss
  • 470
  • 5
  • 12
3
votes
1 answer

SQLite-Net Extension and FileModel

I want make a class representing file/folder, which has one or none parent and can contain files/folders. Because My folder is special case of file. My model looks like this: namespace WPP3.Base.DataModel { public class DbFileModel { …
Pepa147
  • 33
  • 2
3
votes
1 answer

SQLite-Net Extensions: How to get rid of relationship records?

Let's say I have a many-to-many relationship like in the official sample: public class Student { [PrimaryKey, AutoIncrement] public int Id { get; set; } public string Name { get; set; } [ManyToMany(typeof(StudentSubject))] …
asp_net
  • 3,567
  • 3
  • 31
  • 58
2
votes
1 answer

Trouble forming data structure for SQLite in C#

I am trying to build a very simple Xamarin app that functions similarly to a Exercise/Day Planner. The SQLite database should hold a "Day"s table, and every day should relate to an "Activity"s table which it can query that days "Activity"s. These…
Oigeen
  • 25
  • 4
2
votes
1 answer

NullReferenceException Query SQLite database with Where on a concatenated string property

I'm trying to select a record using the following code: Location item = connection .Table() .Where(l => l.Label.Equals(label)) .FirstOrDefault(); This results in: System.NullReferenceException: Object reference not set to an…
Robert
  • 118
  • 1
  • 10
2
votes
1 answer

SQLite: Retrieve child element from object in list

There is a Basket, which stores a List. Each Fruit has one Pip. If I store this relationship and retrieve it later, the ForeignKey PipId has a value, but the object Pip is null, despite I use CascadeRead. If I try to use CascadeOperation.All…
testing
  • 19,681
  • 50
  • 236
  • 417
2
votes
1 answer

Retrieve object with all child elements (and sub child elements)

I want to retrieve an object, which itself has some properties which are of type object. These child objects again contain some object as properties. If I try to retrieve the data from the database I get the result with the children on the first…
testing
  • 19,681
  • 50
  • 236
  • 417
2
votes
1 answer

Many-to-many relationship using Sqlite-net extensions, getting NotSupportedException: Don't know about System.Collections.Generic.List

I have a new Xamarin Forms application where I'm trying to make use of Sqlite-net and Sqlite-net extensions for an ORM. I've followed This guide to create the n:n. Here are my two objects, as well as their intermediate object: Nation using…
Christofer Ohlsson
  • 3,097
  • 4
  • 39
  • 56
1
2
3
9 10