在.net解析库安装上查询自定义列

本文关键字:查询 自定义 安装 net | 更新日期: 2023-09-27 17:50:57

在安装类中,我根据需要添加了两个新列ContactIDUserEmail

现在发送推送通知时,我想查询特定的ContactIDUserEmail

parse.dll提供的Push函数如下:

SendAlertAsync(string alert, ParseQuery<ParseInstallation> query);

ParseInstallation类具有预定义的属性。我如何添加我的两个新属性并构建ParseQuery?

在.net解析库安装上查询自定义列

在这里找到答案

https://parse.com/docs/dotnet/guide push-notifications-using-advanced-targeting

var push = new ParsePush();
push.Query = from installation in ParseInstallation.Query
             where installation.Get<int>("ContactID") == 12
             select installation;
push.Alert = "Willie Hayes injured by own pop fly.";
await push.SendAsync();

await ParsePush.SendAlertAsync("Hi this is test message", new ParseQuery<ParseInstallation>()
                .Where(i => i.Get<string>("UserEmail") == "abc@gmail.com"));