我目前正在制作一个应用程序,需要存储和从sqlite数据库获取数据。我目前使用的两个Nuget包是Sqlite PCL
和SQLite-Net Extensions
。Sqlite一对多关系
[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;}
}
整个事情被编译很好,但是当我尝试运行我得到这个消息的模拟器:
System.NotSupportedException已经扔不知道System.Collections中 .Generic.List1
我检查了SQLite-Net Extensions documentation,它支持List。
有谁知道如何解决这个问题?
不起作用,得到相同的消息。但是,谢谢! – Fayt
我瘦了,他们正在修复(或工作)修复List <>问题。 [link](https://bitbucket.org/twincoders/sqlite-net-extensions/pull-requests/12/support-ilist-instead-of-list-as-enclosed/diff#comment-8587796) – Roman