【发布时间】:2015-10-27 00:22:40
【问题描述】:
我有一个在线 Parse.com 数据库,我可以创建对象并查询它们,但不能更新。在 Parse.com 文档的 Xamarin 部分中,它只告诉您如何在创建对象后直接更新它,我不想这样做。我尝试调整文档对其他平台的说明,但没有奏效,我还尝试查询数据库并在此之后直接输入新字段值,但它将它们视为单独的函数。有人帮忙吗?
Parse.com 文档:
// Create the object.
var gameScore = new ParseObject("GameScore")
{
{ "score", 1337 },
{ "playerName", "Sean Plott" },
{ "cheatMode", false },
{ "skills", new List<string> { "pwnage", "flying" } },
};
await gameScore.SaveAsync();
// Now let's update it with some new data. In this case, only cheatMode
// and score will get sent to the cloud. playerName hasn't changed.
gameScore["cheatMode"] = true;
gameScore["score"] = 1338;
await gameScore.SaveAsync();
我最近尝试的:
ParseQuery<ParseObject> query = ParseObject.GetQuery("cust_tbl");
IEnumerable<ParseObject> customers = await query.FindAsync();
customers["user"] = admin;
record["score"] = 1338;
await record;
【问题讨论】:
-
请张贴代码显示您尝试过的内容。