C# Windows Azure从特定列获取项目
我正在使用WindowsAzure移动服务(c#WinRT应用程序)。表“游戏”由“玩家名称”、“玩家邮箱”和“玩家年龄”列组成 e、 g:第一排:蒂姆tim@hotmail.com21 |第二排:1月jan@hotmail.com二十三 在代码隐藏中,我询问文本框中PlayerName等于name的所有行。 只有一排人的名字是蒂姆。我想得到那个人的PlayerMail并把它放在一个变量中。我该怎么做C# Windows Azure从特定列获取项目,c#,azure,windows-8,azure-mobile-services,C#,Azure,Windows 8,Azure Mobile Services,我正在使用WindowsAzure移动服务(c#WinRT应用程序)。表“游戏”由“玩家名称”、“玩家邮箱”和“玩家年龄”列组成 e、 g:第一排:蒂姆tim@hotmail.com21 |第二排:1月jan@hotmail.com二十三 在代码隐藏中,我询问文本框中PlayerName等于name的所有行。 只有一排人的名字是蒂姆。我想得到那个人的PlayerMail并把它放在一个变量中。我该怎么做 private IMobileServiceTable<Game> todoTab
private IMobileServiceTable<Game> todoTable = App.MobileService.GetTable<Game>();
var player = Player.Text
var databynaam = await todoTable.Where(todoItem => todoItem.PlayerName == player).ToCollectionAsync();
private IMobileServiceTable todoTable=App.mobileseservice.GetTable();
var player=player.Text
var databynaam=wait todoTable.Where(todoItem=>todoItem.PlayerName==player.ToCollectionAsync();
您可以使用选择
操作仅选择该字段:
IMobileServiceTable<Game> todoTable = App.MobileService.GetTable<Game>();
string player = Player.Text;
IEnumerable<string> emails = await todoTable
.Where(game => game.PlayerName == player)
.Select(game => game.PlayerMail)
.ToEnumerableAsync();
string playerMail = emails.FirstOrDefault();
imobileservice表todoTable=App.mobileseservice.GetTable();
字符串播放器=player.Text;
IEnumerable emails=等待发送
.Where(game=>game.PlayerName==player)
.Select(游戏=>game.PlayerMail)
.ToEnumerableAsync();
字符串playerMail=emails.FirstOrDefault();
谢谢!在上面停留了一段时间:)