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

SQLiteNetExtensions multiple ManyToOne relations of same type

I'm trying xamarin app... and I needed sqlite database... that contain 3 tables... users, accounts and transactions... the table of account seems: [Table(nameof(Account))] class Account { [PrimaryKey,AutoIncrement] public int Id { get; set;…
LofiMAM
  • 127
  • 1
  • 11
0
votes
1 answer

How to use sqlite-net extension "https://bitbucket.org/twincoders/sqlite-net-extensions"?

How can I Implement sqlite-net extension "https://bitbucket.org/twincoders/sqlite-net-extensions"? I am downloading the code from the url but not getting how to use it.
anand
  • 1,399
  • 5
  • 23
  • 55
0
votes
0 answers

how to implement sqlite.net extension in xamarin forms?

I am trying to implement the sqlite.Net Extension in my xamarin forms project. I added the sqlite.net extension from nuget. Now I am trying to create the connection with db, but not getting can I do that. I am trying to do it like…
anand
  • 1,399
  • 5
  • 23
  • 55
0
votes
0 answers

C# SQLite-Net Extensions 'SQLiteConnection does not contain a definition for CreateTable'

I am trying to use the SQLite-Net Extensions NuGet package in a WinForms application. I have included a reference within a class and am trying to follow the documentation found here: https://bitbucket.org/twincoders/sqlite-net-extensions However, in…
JohnWick
  • 4,929
  • 9
  • 37
  • 74
0
votes
0 answers

SQLite-Net-Extensions CreateTable does not add new columns to the already existing Table

I am using SQLite-Net-Extensions on C# within a WPF application. I have added a new property in my class "Foo": [ForeignKey(typeof(Distributor))] public int DistributorId { get; set; } [ManyToOne(CascadeOperations = CascadeOperation.None)] …
chincheta73
  • 187
  • 1
  • 22
0
votes
1 answer

Sqlite delete rows older than

I have records in database: record B with property `Checked` set to be current date in UTC. record A with property `Checked` set to be current date in UTC - 48 hours. Then I want to create query to delete rows with property Checked older than 24…
dafie
  • 951
  • 7
  • 25
0
votes
1 answer

sqlite-net-extensions - InsertWithChildrenAsync

I'm trying to create a table using the "sqlite-net-extensions". But the problem is always returning with error. The error that returns is "Read only". I created two models to create the tables. Model --> Login [PrimaryKey, AutoIncrement,…
0
votes
2 answers

InsertWithChildrenAsync() and duplicate primary keys

I get a list of objects from a webservice. The data should be stored in a SQLite database. Thereby I can store the first item in the database with InsertWithChildrenAsync(), on the second I get an exception and the app crashes. Class…
testing
  • 19,681
  • 50
  • 236
  • 417
0
votes
1 answer

How to await LINQ query with multiple from clauses?

I have the following LINQ query that uses multiple from clauses: var count = ( from uTask in db.Table().Where(u => u.ParentId == componentId && u.RouteId == routeId) from workItem in db.Table().Where(w => w.ParentId ==…
lepton
  • 715
  • 1
  • 6
  • 22
0
votes
1 answer

SQLite.Net and SQLiteNetExtensions error after update - relationships and primary keys

I've just updated all the SQLite nugget packages in my proj. All db operations were working just fine. Now, when I try this: items = db.GetAllWithChildren(); I get this error: Item.ItemEvents: OneToMany relationship origin must have Primary Key So…
Lindsay
  • 41
  • 8
0
votes
0 answers

My iOS Mvvmcross app not able access and render a drop-down list of Recipients (AllRecipients) that I have in my database from the Core project

New to xamarin MvvmCross and struggling with some issues. Appreciate for any help. My questions relates to: I. My iOS app not being able access and render a drop-down list of Recipients (AllRecipients) that I have in my database from the Core …
0
votes
2 answers

Building two tables with relation fails

I am trying to build up two tables and a relationship between them in a Xamarin cross plattform application. Here's the code for the tables: [Table("DetailTypes")] public class DetailType { [PrimaryKey, AutoIncrement] public int ID { get;…
Chris
  • 835
  • 12
  • 27
0
votes
1 answer

SQLite Extensions exception: ManyToOne relationship destination must have Primary Key

You can see the error in title. There are my table classes: public class Cars : Table { [NotNull] public string name { get; set; } [ForeignKey(typeof(Models)), NotNull] public int model_out_id { get; set; } …
Nikita Leshchev
  • 1,784
  • 2
  • 14
  • 26
0
votes
1 answer

How to make low level/plain SQL queries with SQLite-Net Extensions?

I'm using SQLite-Net Extensions and I want to check if a table exists, before I do some operations on it. This is what I tried: await this.database.ExecuteScalarAsync("SELECT count(*) FROM sqlite_master WHERE type='table' AND name='{0}'",…
testing
  • 19,681
  • 50
  • 236
  • 417
0
votes
1 answer

How to get Sqlite.net extensions working?

I'm struggling to use Sqlite.net Extensions in my Xamarin Android app. I get the exeption: Don't know about System.Collections.Generic.List`1 [app_name.Model.modelName] The problem is similar to: Sqlite extension is not working as expected and Use…