Saving multiple objects at once in parse.com
asp.net, c#, parse-platform
Solution
Rather than make individual requests to save each object, try using the saveAll method which will batch them:
List<ParseObject> scores = new List<ParseObject>();
foreach (DataRow row in dataTable.Rows) //imagine here I am saving 1000 objects
{
gameScore = new ParseObject("SALON");
gameScore["NAME"] = "NAMETEMP";
scores.Add(gameScore);
}
await ParseObject.SaveAllAsync(scores);
Problem
I am trying to save multiple objects at once in a ASP.NET project to Parse.com backend. I have tried to save it one by one but in some cases it returns me error in the middle of saving process. So some of my objects are being saved some are not. Here is the code I am using: ``` ParseObject gameScore foreach (DataRow row in dataTable.Rows) //imagine here I am saving 1000 objects { gameScore = new ParseObject("SALON"); gameScore["NAME"] = "NAMETEMP"; await gameScore.SaveAsync(); } ```