Attualmente sto facendo un'app che ha bisogno di memorizzare e ottenere dati da e verso un database SQLite. I due pacchetti Nuget attualmente in uso sono Sqlite PCL
e SQLite-Net Extensions
.Sqlite One to Many Relationship
[Table("patient")]
public class Patient
{
[PrimaryKey]
public string ID { get; set;}
public string FirstName { get; set; }
public string LastName { get; set; }
[OneToMany]
public List<PatientVitals> PatientVitals { get; set; }
}
[Table("patientVitals")]
public class PatientVitals
{
[PrimaryKey]
public string VitalID {get;set;}
public string Weight { get; set;}
public string Height { get; set;}
[ForeignKey(typeof(Patient))]
public string SmartCardID {get;set;}
}
Il tutto è compilato bene, ma quando provo a fare funzionare il simulatore sto ottenendo questo messaggio:
System.NotSupportedException è stato gettato Non so circa System.Collections .Generic.List1
Ho controllato l'estensione SQLite-Net documentation e supporta l'elenco.
Qualcuno sa come risolvere questo problema?
Non funziona, ottenendo lo stesso messaggio. Grazie! – Fayt
Sottile c'è una correzione su cui stanno lavorando (o hanno lavorato) per risolvere il problema dell'elenco <>. [collegamento] (https://bitbucket.org/twincoders/sqlite-net-extensions/pull-requests/12/support-ilist-instead-of-list-as-enclosed/diff#comment-8587796) – Roman