【发布时间】:2015-11-11 21:57:33
【问题描述】:
我目前正在制作一个需要在 sqlite 数据库中存储和获取数据的应用程序。我目前使用的两个 Nuget 包是 Sqlite PCL 和 SQLite-Net Extensions。
[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。
有谁知道如何解决这个问题?
【问题讨论】:
-
不起作用,收到相同的消息。谢谢!
-
我认为他们正在努力(或努力)修复 List 问题。 link
标签: c# list generics xamarin sqlite-net