首页 > 解决方案 > 根据单元格的值在表格中查找特定行

问题描述

我目前正在将我的 Xamarin 移动应用程序链接到 Azure 数据库。在所述应用程序中,我需要能够在用户继续浏览注册页面时插入数据。我遇到的困难是找到有关如何从表中检索一行的文档,该表在其中一个单元格中具有特定值。为了简化事情并确保我被理解,我已经(简要地)在下面的 C# 中写出了我想要做的事情。

Table table = new Table();
int rowID = 0;
string username;
if((/*table.row.contains(username))*/){
   rowID = table.row.index();
   var user = App.MobileService.GetTable<UserInfo>();
   user.InsertAsync(//Information from the UserInfo class).(//ToRow[rowID]);
}else{
   DisplayAlert("Uh-oh", "That username wasn't found, please check and make sure you entered it correctly", "Okay");
}

请记住,上面注释掉的方法是编造的;但我希望这能让您更好地理解我想要实现的目标。

另外,如果有人能向我指出有关使用 Xamarin 移动数据库使用他们的数据库的 Azure 文档的方向,那将是惊人的.. 每次我认为我找到了一些结果都是针对不同的平台.

标签: c#azurexamarinazure-sql-database

解决方案


推荐阅读