Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Windows Azure从特定列获取项目_C#_Azure_Windows 8_Azure Mobile Services - Fatal编程技术网

C# Windows Azure从特定列获取项目

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

我正在使用WindowsAzure移动服务(c#WinRT应用程序)。表“游戏”由“玩家名称”、“玩家邮箱”和“玩家年龄”列组成

e、 g:第一排:蒂姆tim@hotmail.com21 |第二排:1月jan@hotmail.com二十三

在代码隐藏中,我询问文本框中PlayerName等于name的所有行。 只有一排人的名字是蒂姆。我想得到那个人的PlayerMail并把它放在一个变量中。我该怎么做

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();

谢谢!在上面停留了一段时间:)