我正在通过调用API获取字符串数据。
JArray parsedArray = JArray.Parse(stringData);
int i = 1;
foreach (var item in parsedArray)
{
ProjectInformation aProjectInformation = new ProjectInformation();
string id = (string)item.SelectToken("formid");
aProjectInformation.FormId = id;
string projectName = (string)item.SelectToken("title");
aProjectInformation.ProjectName = projectName;
string surveyName = (string)item.SelectToken("description");
aProjectInformation.SurveyName = surveyName;
string lastSubmissionTime = (string)item.SelectToken("last_submission_time");
aProjectInformation.LastSubmissionTime = lastSubmissionTime;
int submissionNumber = (int)item.SelectToken("num_of_submissions");
aProjectInformation.TotalSubmission = submissionNumber;
int submissionToday = (int)item.SelectToken("submission_count_for_today");
aProjectInformation.SubmissionToday = submissionToday;
aProjectInformation.Serial = i;
projectList.Add(aProjectInformation);
i++;
}
如何将ID,项目名称,测量名称,最后提交时间,提交编号,今天的提交,序列号存储到SQL Server数据库的表中?