如何显示数据表的某些行?
在显示我的CollectionView(包含数据)时,我只想显示具有字段“ number” = xx的行,
我当前像这样显示我的数据:
public async Task<List<DB_PosteNF>> ListerPF()
{
try
{
return await connection.Table<DB_PosteNF>().ToListAsync();
}
catch (Exception ex)
{
StatutMessage = $"Impossible d'afficher la liste des postes de frais. \nErreur : {ex.Message}";
}
return new List<DB_PosteNF>();
}
这是表的结构,我想要主键号=外键
表1: 主键=编号
表2: 主键= ID 外键=数字
When displaying my CollectionView (which contains the data), I would like to display only the rows that have the field "Number" = xx
Currently I display my data like this:
public async Task<List<DB_PosteNF>> ListerPF()
{
try
{
return await connection.Table<DB_PosteNF>().ToListAsync();
}
catch (Exception ex)
{
StatutMessage = quot;Impossible d'afficher la liste des postes de frais. \nErreur : {ex.Message}";
}
return new List<DB_PosteNF>();
}
Here is the structure of my tables, I would like Primary Key number = Foreign Key
Table 1:
Primary Key = Number
Table 2:
Primary Key = Id
Foreign key = Number
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用Linq
替换
somevalue
与您要过滤的值Use LINQ
Replace
SomeValue
with value you want to filter by