这是我正在使用的方法.
try
{
List<Patient> pList = await App.MobileService.GetTable<Patient>().Where(
patient => patient.id == 1).ToListAsync();
foreach (Patient p in pList)
{
System.Diagnostics.Debug.WriteLine("{0}, {1}", p.id, p.first_name);
}
}
catch (Exception err)
{
System.Diagnostics.Debug.WriteLine("ERROR! : {0}", err.Message);
}
Run Code Online (Sandbox Code Playgroud)
这是患者实体.
class Patient
{
public int id { get; set; }
public string first_name { get; set; }
public string last_name { get; set; }
public string middle_name { get; set; }
public string nirc { get; set; }
public int bed_id { get; set; } …
Run Code Online (Sandbox Code Playgroud) 假设我在桌子上有这些.
Index Resultant First Second
1 Ice Water Cold
2 Cold Air Water Cold
3 Cold Wind Water Cold
4 Hot Air Volcano Air
5 Normal Air Oxygen Hydrogen
6 Ice Cold Water
7 Cold Air Cold Water
8 Cold Wind Cold Water
Run Code Online (Sandbox Code Playgroud)
我想只显示这些
Index Resultant First Second
1 Ice Water Cold
2 Cold Air Water Cold
3 Cold Wind Water Cold
4 Hot Air Volcano Air
5 Normal Air Oxygen Hydrogen
Run Code Online (Sandbox Code Playgroud)
因为底部3区域都是重复的,如果你翻转它们.但我不希望第1,2行被隐藏,因为它也是水和冷的组合.