0

这个查询:

public static async Task<List<string>> GetSenderDeviceIDForSenderIDAndReaderDeviceID(string senderID, string readerDeviceID)
{
    IMobileServiceTable<PLATYPUS_WAMS_INVITATIONS> table = App.MobileService.GetTable<PLATYPUS_WAMS_INVITATIONS>();

    MobileServiceTableQuery<String> query =
        table.Where(i => i.SenderID == senderID).
              Where(i => i.ReaderDeviceID == readerDeviceID).
              Select(i => i.SenderDeviceID).
              Take(1); // the query returns a List, but I only want 1 record (and it should only return 1)
    return await query.ToListAsync();
}

返回“ System.Threading.Tasks.Task 1[System.Collections.Generic.List1[System.String]]

它应该为空(在我正在运行的特定测试用例中)和其他时间的值,例如“03-11-BA-22”。

4

0 回答 0