c# - 根据单元格的值在表格中查找特定行
问题描述
我目前正在将我的 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 文档的方向,那将是惊人的.. 每次我认为我找到了一些结果都是针对不同的平台.
解决方案
推荐阅读
- javascript - 提交表单jsp后关闭窗口
- rxjs - 如何将 RXJS Observable 流分成相等的 N 个大小的数组?
- java - 给定一堆整数,请仅使用加号运算输出所有可能数字的所有组合
- amazon-web-services - 跨账户访问的 AWS S3 存储桶控制策略
- angular - 如何在 Angular 6 中使用 ngTagsInput?
- sql - 基于另一个表中提供的列名构建查询
- android - Android中的地理围栏触发问题
- ios - PopoverPresentationController 在触摸外部时不会被解雇
- android - 如何使用 Volley 将多个文件上传到节点 js 服务器?
- wcf - 通过 Web 服务启动的进程在一段时间后终止