【发布时间】:2017-10-16 21:38:06
【问题描述】:
通过使用 Sqlite,我的表格如下:
public class Medication
{
[PrimaryKey, AutoIncrement]
public int ID { get; set; }
public string unique_id { get; set; }
public string username { get; set; }
public string insulin_type { get; set; }
public string units { get; set; }
public string status { get; set; }
public string alarm_time { get; set; }
public Medication() { }
}
现在我想使用IEnumerable 获取一个列alarm_time 列表,但我不知道如何获取它。下面是我的代码:
public IEnumerable<Medication> AllMedicationResults()
{
return (from t in _connection.Table<Medication>()
select t).ToList();
}
如何在上面的代码中包含alarm_time 列。
【问题讨论】:
-
您只需要
alarm_time列吗? -
是的@GiladGreen